diff options
author | Aravinda VK <avishwan@redhat.com> | 2016-06-13 12:00:40 +0530 |
---|---|---|
committer | Aravinda VK <avishwan@redhat.com> | 2016-06-27 22:31:07 -0700 |
commit | d22305998f99bb9a5c89b5639ca95b3689881510 (patch) | |
tree | 258d5ae6a7602fed23b9014b1783670f4ebed2e2 | |
parent | 94b743782200b2399f2d23d4b47356e602f62777 (diff) |
geo-rep: Safely handle if unliked GFID not present in data list
If unlinked GFID is not present in data list to be synced then
Geo-rep worker was crashing with KeyError. Handled KeyError with
this patch.
BUG: 1348085
Change-Id: I5a1c9ca4473e32606df2e5c7e26c95faf55d44c0
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/14706
(cherry picked from commit 4797ca3778d82a671716d4913c14f285591ae959)
Reviewed-on: http://review.gluster.org/14766
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
-rw-r--r-- | geo-replication/syncdaemon/master.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py index 8d2158fb406..be68a7fd7b4 100644 --- a/geo-replication/syncdaemon/master.py +++ b/geo-replication/syncdaemon/master.py @@ -981,7 +981,8 @@ class GMasterChangelogMixin(GMasterCommon): # Remove Unlinked GFIDs from Queue for unlinked_gfid in self.unlinked_gfids: - self.datas_in_batch.remove(unlinked_gfid) + if unlinked_gfid in self.datas_in_batch: + self.datas_in_batch.remove(unlinked_gfid) # Retry only Sync. Do not retry entry ops if self.datas_in_batch: |