diff --git a/src/ZODB/FileStorage/FileStorage.py b/src/ZODB/FileStorage/FileStorage.py index 3eae2df00e42751790fca2b413b6fb75d46c1f76..7ed90787a2e49c310b95d247007127558fb7d72c 100644 --- a/src/ZODB/FileStorage/FileStorage.py +++ b/src/ZODB/FileStorage/FileStorage.py @@ -101,6 +101,7 @@ class FileStorage( ZODB.interfaces.IStorageIteration, ZODB.interfaces.IStorageUndoable, ZODB.interfaces.IStorageCurrentRecordIteration, + ZODB.interfaces.IExternalGC, ) # Set True while a pack is in progress; undo is blocked for the duration. @@ -556,8 +557,6 @@ class FileStorage( raise FileStorageQuotaError( "The storage quota has been exceeded.") - return self._tid - finally: self._lock_release() diff --git a/src/ZODB/interfaces.py b/src/ZODB/interfaces.py index 90b0cdcb2b60619b1be467f8d060661f9c4197d9..e2afb3ac8a751faced55388f5fae45829c08780f 100644 --- a/src/ZODB/interfaces.py +++ b/src/ZODB/interfaces.py @@ -981,9 +981,6 @@ class IExternalGC(IStorage): non-delete records. The object will be removed from the storage when all not-delete records are removed. - The the storage's transaction id for the current transaction is - returned. - The serial argument must match the most recently committed serial for the object. This is a seat belt. diff --git a/src/ZODB/tests/IExternalGC.test b/src/ZODB/tests/IExternalGC.test index 2d394bd2e57c4f161fa4762406096f71d6ce7e65..b50776b111b7a866509291fc545a8a3b0e95d9a4 100644 --- a/src/ZODB/tests/IExternalGC.test +++ b/src/ZODB/tests/IExternalGC.test @@ -31,10 +31,11 @@ transaction ourselves. >>> txn = transaction.begin() >>> storage.tpc_begin(txn) - >>> tid = storage.deleteObject(oid0, s0, txn) - >>> tid = storage.deleteObject(oid1, s1, txn) + >>> storage.deleteObject(oid0, s0, txn) + >>> storage.deleteObject(oid1, s1, txn) >>> storage.tpc_vote(txn) >>> storage.tpc_finish(txn) + >>> tid = storage.lastTransaction() Now if we try to load data for the objects, we get a POSKeyError: @@ -64,6 +65,9 @@ gone: >>> import time >>> db.pack(time.time()+1) + +>>> time.sleep(1) + >>> storage.load(oid0, '') # doctest: +ELLIPSIS Traceback (most recent call last): ... @@ -101,7 +105,8 @@ isn't current: >>> txn = transaction.begin() >>> storage.tpc_begin(txn) - >>> storage.deleteObject(oid, bad_serial, txn) # doctest: +ELLIPSIS + >>> storage.deleteObject(oid, bad_serial, txn); storage.tpc_vote(txn) + ... # doctest: +ELLIPSIS Traceback (most recent call last): ... ConflictError: database conflict error ...