[ZODB-Dev] Commit seems to succeed but does'nt
Steve Alexander
steve@cat-box.net
Wed, 26 Sep 2001 15:11:46 +0100
Cyril Elkaim wrote:
> Alexander,
"Steve", please :-)
I've copied this to zodb-dev. Perhaps someone there can offer you
further advice.
> I've reorganize the code as you write and that works.
Good.
> But it's not pretty to say the least. It should be better, I think,
> that the root content be maintained in memory between retries. So one
> must maintain all his datas in his own structures and copy them inside
> root before the commit.
That wouldn't work in most cases. That's the point of a conflict error:
there's a conflict between what threads want to do.
You'll probably want to consider how you handle conflict errors at a
"software architecture" level, rather than at an implementation level.
A good architecture will help you to keep the code elegant :)
> Steve Alexander wrote:
>
>>
>> If you get a conflict error, you need to retry the whole transaction
>> (all the changes you made), not just the commit statement.
--
Steve Alexander
Software Engineer
Cat-Box limited