logo       

Re: conflict resolution for PersistentList: msg#00102

web.zope.zodb

Subject: Re: conflict resolution for PersistentList

On Fri, 2004-05-21 at 07:22, Diez B. Roggisch wrote:
> Hi,
>
> after finding that my ConflictError was suppressed by a bad designed
> exception
> handler,

AFAIK, it's a bug in whatever version of ZODB that you're using that you
are allowed to commit inconsistent state back to the database after
there has been a read conflict error, even one which is mistakenly
caught by your own exception handler. It just should raise a separate
conflict error at commit time, and even if *that* is mistakenly caught,
you shouldn't see inconsistent state in the database from a different
connection afterwards (the commit would have failed).

Which ZODB version are you using? Could you maybe post the relevant bit
of your code so I could try it out with the ZODB that ships with recent
versions of Zope to ensure that it's still not an existing bug?

> I now want to implement a _p_resolveConflict method.
>
> I implemented it, but can't work with the passed state. It looks like this:
>
> >>> print oldState
> {'items': PR(1079757676 ('\x00\x00\x00\x00\x00\x00\x00\x02', <class
> 'persistent.list.PersistentList'>)), 'name': 'father'}

I think you probably actually want conflict resolution on the persistent
list object itself instead of on its container. You can do this through
subclassing PersistentList.


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

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



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise