[ZODB-Dev] Re: self.length._p_deactivate() and MVCC
Jeremy Hylton
jeremy at alum.mit.edu
Fri Apr 30 11:40:11 EDT 2004
On Fri, 2004-04-30 at 09:15, Casey Duncan wrote:
> > I think the person who wrote the comment believed that the old value
> > of length would be loaded again if MVCC was enabled. The Length
> > object has an _p_independent() method, however. The return value of
> > that method tells ZODB whether it is okay to read a revision of the
> > object that is inconsistent with other objects. Length's
> > _p_independent() always returns 1, so ZODB will always read the most
> > current revision.
>
> I wrote the comment based on speculative semantics for MVCC. It looks
> like it will still work as intended with MVCC as it is now implemented,
> so I will remove the comment.
Fair enough. I don't think I had any idea how _p_independent() would
work until I was actually writing the code, so your guess was as good as
any. In hindsight, I think the semantics are right, because
_p_independent() would be basically useless if non-current versions took
priority; that is, the _p_independent() hook would never actually get
called.
Jeremy
More information about the ZODB-Dev
mailing list