summaryrefslogtreecommitdiffstats
path: root/geo-replication
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2015-04-23 10:18:49 +0530
committerVijay Bellur <vbellur@redhat.com>2015-04-23 23:03:58 -0700
commit8c053f3fd16462e0afc89f409043d9462c5fa551 (patch)
tree59ac3cb01be64f74ae85130d58c0e7c1037f907b /geo-replication
parent2e16e383128707806cecd9027088cde573ff182d (diff)
geo-rep: Changes required as part of changelog version 1.2
The index value for UNLINK and RMDIR in changelog is no more the last index. It varies based on whether the 'changelog.capture-del-path' is enabled or not. Hence, fixed index is used. The option to capture deleted path in changelog comes with the patch: http://review.gluster.org/#/c/10288/ And the parser changes with http://review.gluster.org/#/c/10166/ Change-Id: Idc1a2e2bf90c888be4524d3ce74865aea09485de BUG: 1214561 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/10344 Tested-by: NetBSD Build System Reviewed-by: Aravinda VK <avishwan@redhat.com>
Diffstat (limited to 'geo-replication')
-rw-r--r--geo-replication/syncdaemon/master.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py
index 721ad9c3635..d06b9794c73 100644
--- a/geo-replication/syncdaemon/master.py
+++ b/geo-replication/syncdaemon/master.py
@@ -800,6 +800,7 @@ class GMasterChangelogMixin(GMasterCommon):
# index for change type and entry
IDX_START = 0
IDX_END = 2
+ UNLINK_ENTRY = 2
POS_GFID = 0
POS_TYPE = 1
@@ -934,6 +935,11 @@ class GMasterChangelogMixin(GMasterCommon):
gfid = ec[self.POS_GFID]
if ty in ['UNLINK', 'RMDIR']:
+ # The index of PARGFID/BNAME for UNLINK, RMDIR
+ # is no more the last index. It varies based on
+ # changelog.capture-del-path is enabled or not.
+ en = unescape(os.path.join(pfx, ec[self.UNLINK_ENTRY]))
+
# Remove from DATA list, so that rsync will
# not fail
pt = os.path.join(pfx, ec[0])