[ZODB-Dev] ConflictError: database conflict error

Tim Peters tim at zope.com
Mon Jan 10 19:06:24 EST 2005


[Bob Horvath]
> Yea, I saw your email suggesting newer tools might work better and was in
> the process of rerunning and debugging using them and literally fell
> asleep at the keyboard and never finished it last night.

That's no excuse <wink>.

I can tell from the output that you're still not using the current (3.2.4)
ZODB, so you're not using the best version of fsrefs.py.  Or maybe you're
using a current fsrefs.py script, but didn't grab the rest of ZODB 3.2.4?

...

> I'll fix up those files later tonight.  An interesting thing is running
> the newer tools doesn't yield any "failed to loads", but rather a lot of
> "referes to invalid objects".
>
>
> http://files.horvath.com/fsrefs.out  (newer fsrefs)
> http://files.horvath.com/fsrefs.old  (older fsrefs)
>
> If you look at the older one, there are two POSKeyErrors in there that
> are not in the newer one.

Yes, it's complaining about an object whose creation has been undone --
there is no current revision of the object.  Newer versions of fsrefs.py
handle that more gracefully.  Note that the two oids in the POSKeyErrors are
precisely the same oids as in the two "failed to load" messages.  The newer
fsrefs don't complain about those, simply because there's nothing wrong
about undoing the creation of an object; it was a bug that fsrefs.py used to
complain about those.

...

> Thanks for the glimmer of hope, and sorry for wasting your time on
> posting links and the screwing them up.

No problem!

> Using the older tools, comparing the fsrefs output above, with the older
> fsdump (which is up there at http://files.horvath.com/fsdump.old), the
> two things that threw PosKeyError are 0xcbc2 and 0xcbc3 did have some
> undo interactions.

That's right.  Trying to load an object whose creation was undone does raise
POSKeyError -- and it should.  An app will normally never try to do that.
fsrefs.py tries it, though, because fsrefs.py tries to load absolutely every
object appearing in the index.  It was a bug that fsrefs used to confuse the
resulting POSKeyError with a "hmm, that's an error" outcome.



More information about the ZODB-Dev mailing list