[ZODB-Dev] Storage API corner cases
Toby Dickenson
tdickenson at geminidataloggers.com
Tue May 27 18:53:16 EDT 2003
On Tuesday 27 May 2003 4:53 pm, Barry Warsaw wrote:
> > The interface isn't very helpful here. :) I think getSerial() probably
> > ought to raise a KeyError when called on an uncreated object.
I agree that feels nicer, but I dont have a compelling justification.
On a practical note, it makes it harder to write a unit test to prove that
storages raise a KeyError when loadSerial is used on an uncreated object.
> > Secondly, there are differences between storages in the list of
> > transaction returned from undoLog: FileStorage includes some transactions
> > that can never be undone because the transaction includes an object for
> > which no previous history exists. DirectoryStorage omit these.
>
> The previous history is missing because of a pack, it's the first
> creation of an object, or some other reason?
Packing.
DirectoryStorage's undoLog excludes transactions that contain revisions to an
object whose previous revision has been lost through packing. There is no
possibility of ever undoing these transactions.
--
Toby Dickenson
http://www.geminidataloggers.com/people/tdickenson
More information about the ZODB-Dev
mailing list