Hi all.

I'm working on an application which uses Zope (2.8, at the moment) and
ZPsycopgDA (toghter with a number of other products).

While writing an acceptance test, I encountered a strange problem: the
test locks up.

A further investigation shown that there were two connections at the
database; one of them was not committed, the other one was blocked
waiting for the other to commit.

I therefore used the pdb in order to stop the execution of the test
inside the connect method of the ZPsycopgDA.DA. Once I had that
breakpoint, I was able to get the logs of the two transactions on the
database, and I had the confirmation that indeed there were two
different transactions.

So, I wondered what could possibily happen, I mean why during a test
there could be a second connect to the database.

I issued a "bt" to see the stack of calls leading to the connect, and
what I could see was that the coonect was called inside the
__setstate__ method of Shared/DC/ZRDB/Connection.py.

I assume therefore that the ZPsycopgDA object has been "ghostified",
during the transaction. But this "assumption" is not supported by any
evidence. In particular, it is not supported by my knowledge of the
internal behaviour of ZODB on objects during a single transaction.

Can anyone provide suggestion on this topic?

Marco Bizzarri
Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to