summaryrefslogtreecommitdiffstats
path: root/geo-replication
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2016-06-13 12:00:40 +0530
committerAravinda VK <avishwan@redhat.com>2016-06-19 23:37:00 -0700
commit4797ca3778d82a671716d4913c14f285591ae959 (patch)
treeaa384f9911776164cc317c7714d51a3779fbd93a /geo-replication
parenta4d35ccb8afeefae4d9cdd36ac19b0e97d0d04d0 (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: 1345744 Change-Id: I5a1c9ca4473e32606df2e5c7e26c95faf55d44c0 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/14706 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'geo-replication')
-rw-r--r--geo-replication/syncdaemon/master.py3
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: