[Zope] Design around conflict errors
Jeff Youel
jyouel-lists at youel.net
Tue Oct 7 14:10:35 EDT 2003
I've created an object to record some information (datetime, url,
username) for each file downloaded from the site for later searching
(CMF 1.3.1, Zope 2.6.1). To do this, I have a BTreeFolder with a
private ZCatalog and put an new instance of a DownloadRecord object (my
own object that just has string members holding the fields to be queried
later) into the folder when the file is requested.
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. Because the
downloads will take a while (they're 1-5 MB), the transaction is not
committed until the download is complete. With a large download it
seems that window for conflicts is large.
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.
I'm thinking of committing the default transaction before sending the
file, but I'm not sure of the implications of doing that.
Any ideas?
Thanks,
Jeff
More information about the Zope
mailing list