[Zope-DB] ZODB/ZEO question.
Willadsens
aagg at comcast.net
Tue Apr 5 08:55:46 EDT 2005
Chris Withers wrote:
> Willadsens wrote:
>
>>> Apparently, two concurrent transactions try to modify the
>>> root object.
>>>
>> Correct, and very intentional.
>
>
> Why? I'd suggest an architecture change that removes the root as a
> hotspot.
Chris, please help me understand how this makes a difference in ZODB.
I currently store a persistent list in the ZODB as follows:
root[db_name] = some list
Are you suggesting that I store it in some other, nested dictionary off
of root, such as:
root[db_name][listname] = some list
Can you give a simple example of what you mean? because, it seems that
in eitehr case, I am hittting the same persistent resource, and this
would not solve my problem.
The whole appeal of the ZODB and the persistence class is the ability to
use Python data structures _normally_. I am hoping to accomplish this
without adding an ugly layer of complexity.
>
>> The current question is: semaphore or trap error and retry? Chris
>> suggested a retry, and said the semaphore is not necessary.
>
>
> If you need a semaphore for this, it doesn't need to be persistent.
> Just use a lok from Python's threading module...
These are good suggestions. Thank you, Dieter and Chris.
Gloria
More information about the Zope-DB
mailing list