[Zope] ZODB.POSException.ConflictError (in custommade
product)
Dieter Maurer
dieter at handshake.de
Sun Oct 26 12:34:42 EST 2003
Gitte Wange wrote at 2003-10-26 11:25 +0100:
> At 11:03 26-10-2003, Dieter Maurer wrote:
> >Gitte Wange wrote at 2003-10-25 13:39 +0200:
> > > I have created a small tool for CMF to count how many times a specific
> > > object has been viewed.
> > > ...
> > > Now from time to time we see the following error:
> > > ZODB.POSException.ConflictError
> >
> >
> >When you put counters in the ZODB, you should use
> >"BTrees.Length" instances. They are small persistent objects with
> >conflict resolution (no ZODB write conflicts) and "independence"
> >(no ZODB read conflicts).
>
> Arh ...
> At this moment I just have a dictionary with URL as key and count as value.
> count is a simple integer.
> So instead I should save value as an instance of BTrees.Length() ?
> Or just I make something else than a dictionary ?
If your counter is maintained in the ZODB, the counter should
be a "BTrees.Length" instance. Otherwise, you can use whatever
data structure seems best for you.
--
Dieter
More information about the Zope
mailing list