Commit 30f7996a authored by Vincent Pelletier's avatar Vincent Pelletier

Fix packing un-created objects.

Also, comment a bit.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2463 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent b973cc15
...@@ -637,14 +637,12 @@ class BTreeDatabaseManager(DatabaseManager): ...@@ -637,14 +637,12 @@ class BTreeDatabaseManager(DatabaseManager):
try: try:
max_serial = tserial.maxKey(tid) max_serial = tserial.maxKey(tid)
except ValueError: except ValueError:
# No entry before pack TID, nothing to pack on this object.
return False return False
try: if tserial[max_serial][2] == '':
tserial.maxKey(max_serial) # Last version before/at pack TID is a creation undo, drop
except ValueError: # it too.
if tserial[max_serial][2] == '': max_serial += 1
max_serial += 1
else:
return False
def serial_callback(serial, _): def serial_callback(serial, _):
updatePackFuture(oid, serial, max_serial, updatePackFuture(oid, serial, max_serial,
updateObjectDataForPack) updateObjectDataForPack)
......
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