[ZODB-Dev] FileStorage modifiedInVersion KeyError -- how to correct and/or debug?

Joseph Wayne Norton norton@alum.mit.edu
Sat, 06 Oct 2001 09:01:27 +0900


Jeremy -

At Fri, 5 Oct 2001 11:42:04 -0400 (EDT),
Jeremy Hylton wrote:
> 
> >>>>> "JWN" == Joseph Wayne Norton <norton@alum.mit.edu> writes:
> 
>   JWN> I have one zodb database from which I have exported a set of
>   JWN> objects and then imported into another database.  I do not have
>   JWN> any active versions however some or a subset of the objects
>   JWN> seem to have a key defined.
> 
> I don't understand what you mean by "have a key defined."  Do you
> think that some set of the objects are locked by a version even though
> you didn't think you had any versions?  You can use the versions()
> method on a storage to get a list of active versions.

Yes, I thought an object was possibly locked by a version even though
I do not believe that I have any active versions.  This was only a
guess based on the name of the variable, modifiedInVersion
... currently zodb is a black box to me.

I had already checked the zope Control_Panel for version management
but it listed no empty versions. I will try the storage versions()
method next.

>   JWN> I tried examining the xml export but I cannot identify where
>   JWN> the version information could possibly be stored. I would like
>   JWN> to know if anyone can recommend how to cleanup and/or debug the
>   JWN> error listed below.  I'm running zope 2.4.1, zeo-1.0b4, and
>   JWN> python 2.1.1 on the solaris platform.
> 
> I'm afraid I don't know what the xml export is.  How did you
> accomplish that?

In zope, you can export and export objects from one zope server to
another using the ZMI interface.  I typically use the binary format
".zexp".  However, I thought in this case the xml format ".xml" might
help see if any objects where tied to a particular version.

>   JWN> 2001-10-05T07:11:23 ERROR(200) ZEO Server error Traceback
>   JWN> (innermost last):
>   JWN>   File
>   JWN> /opt/arseed/tfs-lib/zope/zope-2.4.1/lib/python/ZEO/StorageServer.py,
>   JWN> line 286, in message_input
>   JWN>     (Object: dispatcher)
>   JWN>   File
>   JWN> /opt/arseed/tfs-lib/zope/zope-2.4.1/lib/python/ZODB/FileStorage.py,
>   JWN> line 625, in modifiedInVersion
>   JWN>     (Object:
>   JWN>     /opt/arseed/tfs-app/ios04-zeo-2.3/var/data/Data.fs)
>   JWN> KeyError: ^@^@^@^@^@^E<C2><EC>
> 
> The error in this traceback isn't related to versions specifically.
> You'd get the same key error if you tried to load this key.  The
> storage doesn't have an index record for the key.

Unfortunately, I am not able to pin down any particular set of events
to duplicate this error.  We have one development zope/zeo server set
that raises this error now and then.  I experienced the same trouble
with our production zope/zeo server set while trying to move content
(via the ".zexp" and ".xml" export mechanism) from the development
server set.

So, would you recommend that the index for the zodb be rebuilt?  

If so, my guess is that I can stop the zeo server, truncate the
Data.fs.index file, restart zeo, and it will re-generate the index
file.

thanks,

- joe n.