[Zope] Design around conflict errors

Toby Dickenson tdickenson at geminidataloggers.com
Wed Oct 8 03:05:40 EDT 2003


On Tuesday 07 October 2003 19:10, Jeff Youel wrote:

> I'm running into conflict errors; I think because the download record
> object is added to a single folder so concurrent downloads on different
> threads are competing trying to modified the folder.

That makes sense.

One solution is to replace that folder object with something folder-like that 
implements "application level conflict resolution". That will allow your new 
folder-like object to 'merge' the additions made by two concurrent 
transactions.

Why not add that to an ordinary folder? You could, but Folders have a wide 
interface and maintain alot of other state. It will be easier to merge a 
simpler object.

> I've been googling and reading about conflict errors but haven't found a
> solution yet.  I've tried committing the a sub-transaction but that
> didn't help.

Thats right. Write conflicts are checked by the storage, at the end of the 
full transaction.

I hope this helps

-- 
Toby Dickenson




More information about the Zope mailing list