On Mon, Feb 03, 2014 at 03:33:13PM +0100, Godefroid Chapelle wrote: > Le 03/02/14 15:12, Marius Gedminas a écrit : > >Could you tell us why that test depends on Acquisition? Is it possible > >to replicate the bug using pure Python code? > > I have not been able to replicate the bug with pure Python code. > Reason why it took me so much time. > > IIRC, the issue is that on newly created objects that inherit from > Acquisition.Implicit, the _p_jar attribute has a value (I guess it > is acquired). Without acquisition, because a newly created > BTree._p_jar does not have any value before transaction is > committed, any call to readCurrent is then discarded.
Ah, I thought it might be caused by the acquisition of _p_oid, but then decided that made no sense. (Actually I thought Acquisition would skip _p_* or _v_* attributes, and I'm surprised to hear that it doesn't.) > I understand this gives the feeling that the fix should be in > Acquisition rather than in ZODB. I have tried to make a fix for the > Acquisition code but was unable to understand enough. > > Nevertheless, my understanding of the readCurrent API makes me think > that it is actually useless to keep reference to newly created > objects (iow in same transaction). And that the fix I propose makes > sense anyway. I'm not disputing that. (This is way beyond my familiarity with ZODB internals.) Marius Gedminas -- "question = (to) ? be : !be;" -- Shakespeare
Description: Digital signature
_______________________________________________ For more information about ZODB, see http://zodb.org/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev