[ZODB-Dev] Problems when Conflict Resolution import code that try to open client storage

Tim Peters tim.one at comcast.net
Wed Sep 21 11:39:42 EDT 2005


[Paolo Linux]
> 	as a zodb newbie I had a hard debugging session...
>
> I had zodb hanging when It had to solve Conflict situations. It turned
> out to be that it tried to import some modules that tried to instantiate
> ClientStorage...
>
> I easily fixed the hurting code... Lesson learned:
>
> - never automatically register in db objects via __init__
>    (or access to zodb, more generally)
>
> - instantiate ClientStorage only when required...
>
> Just a small suggestion. Is there any way to catch this problem and
> issue a specific Execption rather that letting zeo hanging?

I expect you'll discover the difficulties if you try to define _precisely_
what "this problem" is.  How is the ZEO client connection code supposed to
guess that, despite that you asked to connect to a ZEO server, you didn't
really mean it ;-) ?

Extreme answers like "well, it could examine the call stack and see whether
conflict resolution invoked this code, and then guess that, if it is, the
code didn't really mean to connect to ZEO" don't make much sense.




More information about the ZODB-Dev mailing list