From d22305998f99bb9a5c89b5639ca95b3689881510 Mon Sep 17 00:00:00 2001 From: Aravinda VK Date: Mon, 13 Jun 2016 12:00:40 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/14706 (cherry picked from commit 4797ca3778d82a671716d4913c14f285591ae959) Reviewed-on: http://review.gluster.org/14766 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Kotresh HR CentOS-regression: Gluster Build System --- geo-replication/syncdaemon/master.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'geo-replication/syncdaemon') 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: -- cgit