I am no ZODB expert. But I see a few thins that are wrong with the code. Others should be able to comment at length:
- You cant just catch ConflictError and pass
- I think you can catch a ReadConflictError and *retry* that is ok.
- But a ConflictError needs to be *retried* manually in your client code.
If you catch a ConflictError you need to abort the transaction.
You should be explicit about *beginning* transactions after ending previous transaction.
If your using threads. I believe you need to be a bit more careful. Does this code
corrupt ZODB if your *not* using threads?
Instead of using threads try:
- Write the code to be used in single process
- Start 3 processes; see if that fails
- Remove your try/except around ConflictError. ConflictErrors need to be handled.
NOTE: In Zope the framework handled ConflictError's automatically but your doing
everything *outside* of Zope. Which means your code needs to do the retries.
Enfold Systems, Inc.
_______________________________________________ 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