From 4e576b97f0c5b636f2e6490371408ebc18c97f6d 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/ BUG: 1217935 Change-Id: I6d8a941129416381e24226faed9803f7e5fae8d0 Signed-off-by: Kotresh HR Reviewed-on: http://review.gluster.org/10344 Reviewed-on: http://review.gluster.org/10500 Tested-by: NetBSD Build System Reviewed-by: Aravinda VK Tested-by: Gluster Build System --- geo-replication/syncdaemon/master.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'geo-replication/syncdaemon/master.py') diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py index 6318438608a..e0a3604071c 100644 --- a/geo-replication/syncdaemon/master.py +++ b/geo-replication/syncdaemon/master.py @@ -811,6 +811,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 @@ -945,6 +946,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