Journaling

Ivan Smahin ivan_smahin at paradigmasoft.com
Fri Apr 20 06:09:47 CDT 2012


On Apr 20, 2012, at 10:23 AM, Fabian Kneubuehl wrote:

> Ruslan,
>  
> I used transaction control for concurrent DB changes in other DBs. E.g. If I generate an invoice I start a TA, then I print the invoice. In the case the printing fails, I rollback all TAs else I commit. So I guarantee, that the invoices data are consistent. But flushing the DB was done by the DB itself and not by my app!
>  


> The only secure strategy to prevent a huge data loss is to flush all DB changes. Why does VServer not flush e.g. all x minutes (settable with a property in VServer.INI)

vServer has FlushEachDataChanges setting in the ini.

; 1 - Flush after any data modification.
; 0 - Default value - no flushing.
FlushEachDataChanges=0


> and what happens if cache is full?
>  

It is usual state of the cache. Assume that cache is full and we ask to load one more db-page from the storage.
Firstly, we are trying to "unload" any (oldest) "unchanged" page (probably not a single page but some set of pages to improve performance) from the cache (obviously, such a page is not writing to the disk because it is not changed).
If there are no "unchanged" pages in the cache then we have to "free" some "dirty" page and such a page goes to the rollback journal first, and after that, we write it down to the db storage. If some crash happens we know how to restore the database to get rid of such a "dirty" changes.


-- 
Best regards,
Ivan Smahin
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macserve.net/pipermail/valentina-beta/attachments/20120420/0ec40baf/attachment.html>


More information about the Valentina-beta mailing list