[Zope3-dev] MinimalMemoryStorage test failure in Zope 3

Barry Warsaw barry@python.org
30 Jun 2003 12:33:32 -0400


On Mon, 2003-06-30 at 11:29, Marius Gedminas wrote:
> On Wed, Jun 25, 2003 at 04:48:52PM -0400, Tim Peters wrote:
> > > BTW I occasionaly see other errors in the ZODB code as well, for
> > > example:
> > 
> > The actual failures you see are helpful; "for example" doesn't do anything
> > to help resolve the ones you don't specifically list, of course.
> 
> They're not as easily reproducible, and I've never seen them before the
> sprint.  Initially I even suspected my hardware, and did not save the
> tracebacks.

In talking with Jim today, we came to the following conclusions:

- Minimal storage (both memory and Berkeley since its the same code
base) doesn't have to allow transactions to occur during packing.  Jim's
view is that packing's only necessary to get rid of cycles and you
shouldn't be using minimal if you have cycles (you can always break them
explicitly).

So I think we can fix this buglet by doing the pack atomically.

- Full storage is theoretically vulnerable to the same race, if our
current hypothesis about the cause is correct.  But in practice it
should never happen unless you do the cyclic pack operations with a pack
time of "now".  You almost always pack to some point in the past, e.g.
an hour ago or longer, and as long as the pack time is longer than the
length of a transaction, you should be fine.  I think <wink>.

Tim's probably checking in a fix to minimal as we speak.

-Barry