[ZODB-Dev] Re: ZODB packing error

Jeremy Hylton jeremy at alum.mit.edu
Mon Apr 5 10:39:34 EDT 2004


On Mon, 2004-04-05 at 10:10, Barry Warsaw wrote:
> On Mon, 2004-04-05 at 10:07, Casey Duncan wrote:
> 
> > Another approach might be to increase the pack time automagically so
> > that it falls just before the start time of all transactions that are
> > in-progress. This would mean that "pack 0" actually might me "pack to 1
> > minute ago" if a transaction that started a minute ago was still going
> > when the pack was invoked.
> 
> Or, change the semantics of "pack 0" to mean "pack to the just before
> the start time of the earliest current in-progress transaction".

There's no way for the storage to know what transactions are currently
in progress, so that's not an option for the storage interface.  But
MVCC makes it plausible that the DB could figure out the current
transaction.  Each Connection now has a _txn_time used to determine what
tid to use for request non-current revisions.  The lowest _txn_time of
all Connections is a decent approximation of the lowest tid that could
still be used in conflict resolution.  It's possible for _txn_time to be
None, in which case you would probably use the tid of the last
invalidation message the DB received.

Jeremy





More information about the ZODB-Dev mailing list