[Neo-report] r2463 vincent - /trunk/neo/storage/database/btree.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Nov 17 14:05:22 CET 2010
Author: vincent
Date: Wed Nov 17 14:05:21 2010
New Revision: 2463
Log:
Fix packing un-created objects.
Also, comment a bit.
Modified:
trunk/neo/storage/database/btree.py
Modified: trunk/neo/storage/database/btree.py
==============================================================================
--- trunk/neo/storage/database/btree.py [iso-8859-1] (original)
+++ trunk/neo/storage/database/btree.py [iso-8859-1] Wed Nov 17 14:05:21 2010
@@ -637,14 +637,12 @@ class BTreeDatabaseManager(DatabaseManag
try:
max_serial = tserial.maxKey(tid)
except ValueError:
+ # No entry before pack TID, nothing to pack on this object.
return False
- try:
- tserial.maxKey(max_serial)
- except ValueError:
- if tserial[max_serial][2] == '':
- max_serial += 1
- else:
- return False
+ if tserial[max_serial][2] == '':
+ # Last version before/at pack TID is a creation undo, drop
+ # it too.
+ max_serial += 1
def serial_callback(serial, _):
updatePackFuture(oid, serial, max_serial,
updateObjectDataForPack)
More information about the Neo-report
mailing list