While doing a 'pack' on a Zope instance that is using multiple
databases, a KeyError 'n' happened. Upon investigation, we found out
that the 'oid_loaders' dictionary used by 'referencesf' (in
ZODB.serialize), which is in turn used by pack (presumably to find the
oids referenced by an object), doesn't have a loader registered for

A reference_type of 'n' means:

       Multi-database simple object reference.  The arguments consist
       of a databaase name, and an object id.

The ObjectReader class defined a few lines above 'referencesf' *does*
know how to load a multi-database simple object reference.

Now my question is, should 'referencesf' load those multi-database
references, or should they be treated just like the 'weak references',
by returning None, or should something else happen? Or maybe that
reference shouldn't be there in the first place?

This problem is preventing us from packing a database. It just falls
dead with the KeyError 'n' when packing.

You can find the traceback below.

2007-03-29T19:41:38 ERROR ZEO.zrpc (2822) Error raised in delayed method
Traceback (most recent call last):
 File "/usr/local/zope/fabricio/zserver296/lib/python/ZEO/StorageServer.py",
line 1009, in run
   result = self._method(*self._args)
 File "/usr/local/zope/fabricio/zserver296/lib/python/ZEO/StorageServer.py",
line 345, in _pack_impl
   self.storage.pack(time, referencesf)
line 1348, in pack
   opos = p.pack()
line 482, in pack
line 228, in findReachable
line 304, in findReachableAtPacktime
line 377, in findrefs
   return referencesf(self._file.read(dh.plen))
 File "/usr/local/zope/fabricio/zserver296/lib/python/ZODB/serialize.py",
line 647, in referencesf
   oid = oid_loaders[reference_type](*args)

Sidnei da Silva
Enfold Systems                http://enfoldsystems.com
Fax +1 832 201 8856     Office +1 713 942 2377 Ext 214
For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to