Commit b8bb602b authored by Tim Peters's avatar Tim Peters

Merge rev 38757 from 2.8 branch.

Putative fix for Collector 1912.

File._read_data():  This uses savepoints just to get oids assigned
and to free memory, with no possibility of rollback.  Therefore
"optimistic" savepoints should be used:  there's no reason here to
insist that any data managers involved support rollback.
parent a0b80c75
......@@ -516,7 +516,7 @@ class File(Persistent, Implicit, PropertyManager,
# Make sure we have an _p_jar, even if we are a new object, by
# doing a sub-transaction commit.
transaction.commit(1)
transaction.savepoint(optimistic=True)
if self._p_jar is None:
# Ugh
......@@ -542,7 +542,7 @@ class File(Persistent, Implicit, PropertyManager,
data.next = next
# Save the object so that we can release its memory.
transaction.commit(1)
transaction.savepoint(optimistic=True)
data._p_deactivate()
# The object should be assigned an oid and be a ghost.
assert data._p_oid is not None
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment