[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.


_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to