diff options
author | Kotresh HR <khiremat@redhat.com> | 2015-04-23 10:18:49 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-05-04 11:23:13 -0700 |
commit | 4e576b97f0c5b636f2e6490371408ebc18c97f6d (patch) | |
tree | f83ddb927bafb174d64134be855110a080262757 /geo-replication | |
parent | 9bc39bcd8c1ed64eff1ea6c83801a57f37e6b8bc (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/
BUG: 1217935
Change-Id: I6d8a941129416381e24226faed9803f7e5fae8d0
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/10344
Reviewed-on: http://review.gluster.org/10500
Tested-by: NetBSD Build System
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'geo-replication')
-rw-r--r-- | geo-replication/syncdaemon/master.py | 6 |
1 files changed, 6 insertions, 0 deletions
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]) |