Commit c6b80f7b authored by Julien Muchembled's avatar Julien Muchembled

importer: allow truncation after the last tid to import, during or after the import

This is a partial implementation. To truncate at a smaller tid, you must wait
that data is imported up to this tid and stop using the Importer backend.
parent 24a9f1b8
......@@ -505,6 +505,13 @@ class ImporterDatabaseManager(DatabaseManager):
raise NotImplementedError
return self.db.getFinalTID(ttid)
def _deleteRange(self, partition, min_tid=None, max_tid=None):
# Even if everything is imported, we can't truncate below
# because it would import again if we restart with this backend.
if u64(min_tid) < self.zodb_ltid:
raise NotImplementedError
self.db._deleteRange(partition, min_tid, max_tid)
def getReplicationTIDList(self, min_tid, max_tid, length, partition):
p64 = util.p64
tid = p64(self.zodb_tid)
......
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