[ZODB-Dev] Missing loader for multidatabase refs?
Sidnei da Silva
sidnei at enfoldsystems.com
Thu Mar 29 19:04:00 EDT 2007
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
'n'.
A reference_type of 'n' means:
'n'
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)
File "/usr/local/zope/fabricio/zserver296/lib/python/ZODB/FileStorage/FileStorage.py",
line 1348, in pack
opos = p.pack()
File "/usr/local/zope/fabricio/zserver296/lib/python/ZODB/FileStorage/fspack.py",
line 482, in pack
self.gc.findReachable()
File "/usr/local/zope/fabricio/zserver296/lib/python/ZODB/FileStorage/fspack.py",
line 228, in findReachable
self.findReachableAtPacktime([z64])
File "/usr/local/zope/fabricio/zserver296/lib/python/ZODB/FileStorage/fspack.py",
line 304, in findReachableAtPacktime
todo.extend(self.findrefs(pos))
File "/usr/local/zope/fabricio/zserver296/lib/python/ZODB/FileStorage/fspack.py",
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
More information about the ZODB-Dev
mailing list