[ZODB-Dev] Re: [Zope] ZODB.POSException.ReadConflictError
Christopher N. Deckard
chris@globalfoo.net
Wed, 8 Jan 2003 07:32:01 -0500
On Wed, 8 Jan 2003 12:28:11 +0000, Toby Dickenson spoke forth:
> On Wednesday 08 January 2003 12:11 pm, Christopher N. Deckard
> wrote:
>
> > > Not really. The idea behind ReadConflictErrors is that your
> > > update may have changed some data which the query is then
> > > trying to use, but this may not be consistent which the rest
> > > of the information your query has already used, so the error
> > > is raised.
> >
> > It'd be neat if the old copy of the object and catalog were
> > available until the update transaction was completed. Then the
> > new ones could be put in. I don't know the details in how
> > updates are handled in the ZODB though.
>
> That is planned for the future. For now you can fake it by
> touching every object you need at the start of your transaction.
> That moves a copy into memory, and every access for the rest of
> that transaction will be safe from ReadConflictErrors
So how I do that? Just make a reference to it somewhere in my code?
I would assume that it should be doing that already since I do
"touch" things throughout the query. I only need to touch the
catalog, and I thought that I was doing that.
-Chris