Valentina Server

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Jun 25 12:53:59 CDT 2004


On 6/25/04 12:52 PM, "olivier vidal" <vidal_olivier at yahoo.fr> wrote:

>> And must be db1.write(), flush
>> Then only db2.write()
> 
> This system of double database would especially be important in case,
> for example, of crash of the computer.
> To have an optimal safety, I can, in every writing:
> 
> Db1.write ()
> Db2.write ()
> Db1.flush
> Db2.flush

No,

Must be

 Db1.write ()
                << if crash here, and DB1 corrupted
                << then DB2 is good and you can copy it to DB1.
 Db1.flush      
                <<< now db1 have changes on disk, and crash cannot corrupt
                <<< if crashes here, then Db1 is good, but DB2 no.
 Db2.write ()
 Db2.flush

Although I think you will need then make journal of like

    db1 flushed 
    db2 flushed

    db1 flushed 
    db2 flushed

 
> Or, is it a little bit dangerous all the same in case of crash that
> both flushes are so moved closer?

> If for example there is a crash exactly in the middle of both flushs,
> both databases risk to be corrupted? Is not it better to make the
> second flush a little later?

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list