ZODB.Connection.rollback may cause custom _p_invalidate to load wrong state

Bug #428039 reported by Jacob Holm on 2009-09-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ZODB
Status tracked in 3.9
3.10
Undecided
Unassigned
3.9
High
Unassigned

Bug Description

ZODB.Connection._rollback invalidates the cache before resetting the TmpStore. This causes any _p_invalidate methods to be called while the state has not yet been rolled back. This means that a custom _p_invalidate that loads the object after calling Persistent._p_invalidate, will load the wrong state.

AFAICT, the bug is present in all versions of ZODB that support savepoints.

The fix is simple, see attached patch against the trunk r103853 (including test).

Jacob Holm (jacobholm) wrote :
description: updated
Jim Fulton (jim-zope) on 2010-04-22
Changed in zodb:
importance: Undecided → High
Jim Fulton (jim-zope) wrote :

Much thanks for a patch that included a test!

Changed in zodb:
status: New → Fix Committed
milestone: none → 3.9.5
milestone: 3.9.5 → 3.10.0a2
milestone: 3.10.0a2 → 3.9.5
Tres Seaver (tseaver) wrote :
Tres Seaver (tseaver) wrote :

Fix released with ZODB 3.9.5:

 http://pypi.python.org/pypi/ZODB3/3.9.5#id1

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers