Chris McDonough wrote:

> On Mon, 2003-03-17 at 20:34, John Eikenberry wrote:
> > The KeyErrors happen under similar circumstances to the ReadConflictErrors.
> > The significant difference being that the KeyErrors happen after the
> > transience timeout has occured. When I am running with the
> > LowConflictConnection disabled the KeyErrors occur in the
> > Connection.setstate method at line 509, before the ReadConflictError check.
> Is this the same KeyError you reported as coming out of
> TemporaryStorage.load?

Yes. I'm referring to the traceback I reported in a previous mail:

The error occurs on the same line in TemporaryStorage.load(), whether it gets
called from ZODB/ or TemporaryFolder/
> > So say you have 2 threads; A and B.  If A starts first, hits the session
> > code and triggers a _housekeep() call during which time B has started but
> > has not reached the Sessions code until after _housekeep() has finished.
> > When it does reach the sessions code, you get the KeyErrors. 
> Would you mind restating that?  I think this is important, and I'm not
> sure I understand the second sentence above.

I'm working off the idea that the load() KeyErrors went away when the
ReadConflictErrors did. So it seemed like they were probably triggered by
similar scenarios. The difference being that for the former, the timeout had
been reached and the _housekeep() code had been run (and possibly some
additional code in _getCurrentBucket).

Now given Toby's description of how ReadConflicts occur [1], it seems that
instead of a change being committed to the object it is instead deleted (in
_housekeep). Thus instead of getting the object and seeing it is marked as
invalid, it cannot get the object at all when it expects to be able to...
resulting in the KeyError in load().

[1] "Read conflicts occur if a change is committed in between the start of a
transaction, and the transaction needing to load the object. A workaround to
reduce the number of read conflicts is to touch the objects that are likely
to change early in the transaction."


John Eikenberry [EMAIL PROTECTED]
"A society that will trade a little liberty for a little order
 will deserve neither and lose both."
                                          --B. Franklin

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to