[Zope-DB] ZODB question
Dieter Maurer
dieter at handshake.de
Sun Oct 19 12:13:17 EDT 2003
Bo M. Maryniuck wrote at 2003-10-14 13:09 +0200:
> This is ZODB question. Since this is also DB, therefore this is not OT. ;-)
>
> I found in my log's this:
>
> --------------------
> 2003-10-14T12:15:07 ERROR(200) ZODB Shouldn't load state for
> '\x00\x00\x00\x00\x00\x19\xc2\xc1' when the connec
> closed.
> --------------------
>
> What it does mean? In .../ZODB/Connection.py it causes when self._storage is
> empty and _storage is a usually FileStorage instance. Who can tell me why it
> wants to load state (?) on closed storage for an object and what might be
> wrong with that object?
Because you use a persistent object in a way you should not...
A persistent object has a hidden reference to the connection
which loaded the object from the storage ("_p_jar").
The connection is closed when the request finished.
Therefore, you must not use a persistent object outside the request
that loaded it. Apparently, you do just that.
Prominent examples for such wrong-doing are:
* storing persistent objects in a cache (other than the connection's
own ZODB cache)
* passing a persistent object to a separate thread.
Dieter
More information about the Zope-DB
mailing list