From 8c053f3fd16462e0afc89f409043d9462c5fa551 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Thu, 23 Apr 2015 10:18:49 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/10344 Tested-by: NetBSD Build System Reviewed-by: Aravinda VK --- geo-replication/syncdaemon/master.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'geo-replication') 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]) -- cgit