[ZODB-Dev] [Problem] "_v_" variables too volatile
Jeremy Hylton
jeremy at zope.com
Wed Dec 10 11:17:23 EST 2003
On Wed, 2003-12-10 at 10:30, Casey Duncan wrote:
> > Perhaps the solution should be sub-transaction specific, since that's
> > the source of the problem. Then you wouldn't need to pay for this
> > feature for the vast majority of objects and transactions where
> > subtransactions aren't used. I'm thinking about the cost (space and
> > speed) of adding extra magic for _v_ variables.
>
> If there is a flag like _p_dont_deactivate (or just the sticky state) then making this an explicit gesture by the application seems like the best. I don't want every setattr to do extra work/checking that it doesn't have to.
>
> Although this means changing code, it also makes it more flexible. There are cases where I set _v_ variables (and in fact it's most cases) where I could care less if the object is flushed on subtransactions. IOW I think using _p_dont_deactivate should be the exception and not the rule.
Sounds good to me. Explicit is better than implicit.
Jeremy
More information about the ZODB-Dev
mailing list