On Jun 19, 2008, at 9:52 AM, Peter Wilkinson wrote:
At the moment the shelf storage just writes a prefix of "SHELF-1" at
the start of the file; might it make sense to put an additional bit
of data after that before the transactions are started which would
identify when this database was created/packed. A UUID would be
ideal but a bit rough to require Python 2.5 but maybe a timestamp
would be enough. This way a script to replicate the database would
just need to read the first x bytes to compare to what it had to
know what kind of rsync to perform, no knowledge outside of what is
in the source and destination database would be needed.
This is a reasonable idea. Neil Schemenauer recently proposed adding
something like this to the header. I feel reluctant to make a change
in the file format just now, though, since I hope to get a new release
out in the next month or two. Maybe if we need to add a new SHELF
format
on a later release, we can use the UUID and make 2.5 the minimum.
I do, however, think we already have an alternative that may work just
as well.
Essentially, we use changes in the stat of the remote ".prepack" file
as a signal that a pack has occurred.
The client runs a remote "stat" on the remote ".prepack" file and
compares
this to a locally saved copy of the last stat output. If there is no
locally
saved stat info, or if the two stats don't match, we run append with the
"--append-verify" flag. Otherwise, we just use the "--append" flag.
_______________________________________________
QP mailing list
[email protected]
http://mail.mems-exchange.org/mailman/listinfo/qp