From 843e845ddeb0b6f37f72fc75b30094904831e6f2 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Thu, 26 Apr 2018 21:26:13 +0000 Subject: [PATCH] Commit from pending file less often Shard ranges *can't* be in the pending file, so no need to try to clear it when fetching shard ranges. And we already try to commit down in _empty, so is_reclaimable was previously trying to do it *twice*. Change-Id: Ia5867b163eb4e9b516a0306a505cd2bc3dd49d43 --- swift/container/backend.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/swift/container/backend.py b/swift/container/backend.py index 4c9c2d601e..3d1915c7cb 100644 --- a/swift/container/backend.py +++ b/swift/container/backend.py @@ -789,7 +789,6 @@ class ContainerBroker(DatabaseBroker): return self._is_deleted_info(**info) def is_reclaimable(self, now, reclaim_age): - self._commit_puts_stale_ok() with self.get() as conn: info = conn.execute(''' SELECT put_timestamp, delete_timestamp @@ -1617,7 +1616,6 @@ class ContainerBroker(DatabaseBroker): raise return [] - self._commit_puts_stale_ok() if connection: return do_query(connection) else: