oids improperly reused after savepoint rollback
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ZODB |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
In ZODB 3.10.0, if a savepoint is created after a persistent object is added to a connection, and then the savepoint is rolled back, the new object's oid is incorrectly added to the DB's _saved_oids list. Then if another object is added, it gets the same oid as the first object. This becomes evident with a traceback like the following when the second object gets added to the cache:
Traceback (most recent call last):
File "/Users/
File "<doctest ZODB.tests.
sp2 = transaction.
File "/Users/
return self.get(
File "/Users/
File "/Users/
savepoint = Savepoint(self, optimistic, *self._resources)
File "/Users/
savepoint = savepoint()
File "/Users/
File "/Users/
File "/Users/
ValueError: A different object already has the same oid
I've attached a failing test case. This is currently blocking use of ZODB 3.10.0 with Plone trunk.
Changed in zodb: | |
status: | Fix Committed → Fix Released |
Changed in zodb: | |
status: | In Progress → Fix Committed |
Changed in zodb: | |
status: | Fix Committed → Fix Released |
will be in 3.10.1