From eccc552f52ce3b3afebe9f58d1eaf243b4c5e477 Mon Sep 17 00:00:00 2001 From: Alistair Coles Date: Wed, 25 Apr 2018 13:13:56 +0100 Subject: [PATCH] Remove TODO re taking lock before deleting retiring db Remove this TODO since we do not plan to take a lock before deleting a retiring db. A lock might be required if there was a risk of the retiring db being modified between the cleaving context being checked and the db being deleted in _complete_sharding(). The following steps have been taken to avoid any such modification: 1. No object updates are committed to the retiring db from the pending updates file [1]. 2. No objects are replicated to the retiring db (nor the fresh db) after sharding begins [2]. 3. Multiple attempts are made to abort any rsync_then_merge process that started before sharding began [3]. [1] Related-Change: I268d01a373491c693b793748065d212f9703ffab [2] Related-Change: I289f558381d028b4d3129e4e51549d3f1a58dc2f [3] Related-Change: Ib285efbadb222b7c843fc212e5ae912ccd7b7ead Change-Id: Ia53aa7a04b483ff91ca03de1a723602eb777a289 --- swift/container/sharder.py | 1 - 1 file changed, 1 deletion(-) diff --git a/swift/container/sharder.py b/swift/container/sharder.py index 6deec620a9..7474b0a6c0 100644 --- a/swift/container/sharder.py +++ b/swift/container/sharder.py @@ -1100,7 +1100,6 @@ class ContainerSharder(ContainerReplicator): cleaving_context.cleaving_done) def _complete_sharding(self, broker): - # TODO: wrap this in a lock cleaving_context = CleavingContext.load(broker) if cleaving_context.done(): # Move all CLEAVED shards to ACTIVE state and if a shard then