Santi Camps wrote:
> We've been using RelStorage 1.1.c1 in production environments over
> postgresql 8.1 for some time.   It has been working really fine, but
> yesterday we have a big problem packing a relstorage zodb mounted as a
> zope mount point.

I'm guessing that your mounted object is not attached to the root of the
mounted database.  In that situation, both RelStorage and FileStorage
will pack away practically everything in the mounted database, because
from the viewpoint of the mounted database, the disconnected object is
unreachable and thus garbage.

A quick workaround is to disable garbage collection in zope.conf; then
you can pack without losing any objects at all.  A proper fix would be
to make the mounted object reachable from the mounted database root.  I
believe the Zope 2 support for mounted databases does this
automatically, but it's possible that Zope 3 takes an unwise shortcut.

> But just one second later (22:11:32) a KeyError appears in event.log,
> and the content of the database couldn't been seen in ZMI.   We try to
> remount it, restart zope, and so on, but nothing works, so we had to
> restore a backup.
> That's the traceback of event.log:
> Traceback (most recent call last):
> File "/usr/local/zope/lib/python/ZODB/", line 768, in setstate
> self._setstate(obj)
> File "/usr/local/zope/lib/python/ZODB/", line 804, in _setstate
> p, serial = self._storage.load(obj._p_oid, self._version)
> File "/usr/lib/python2.4/site-packages/relstorage/", line
> 311, in load
> self._log_keyerror(oid_int, "no tid found(2)")
> File "/usr/lib/python2.4/site-packages/relstorage/", line
> 255, in _log_keyerror
> rows = adapter.iter_object_history(cursor, oid_int)
> File "/usr/lib/python2.4/site-packages/relstorage/adapters/",
> line 229, in iter_object_history
> raise KeyError(oid)
> KeyError: 7L

I should note that this KeyError occurs while trying to report on a
KeyError.  I need to fix that.  Fortunately, the same error pops out anyway.


For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -

Reply via email to