From 6c5e9542a62f0dee3758fb262d6101c43414010d Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Wed, 15 Feb 2017 03:44:17 -0500 Subject: geo-rep: Fix xsync crawl If stime is set to (0, 0) on master brick root, it is expected to do complete sync ignoring the stime set on sub directories. But while initializing the stime variable for comparison, it was initailized to (-1, 0) instead of (0, 0). Fixed the same. The stime is set to (0, 0) with the 'reset-sync-time' option while deleting session. 'gluster vol geo-rep master fedora1::slave delete reset-sync-time' The scenario happens when geo-rep session is deleted as above and for some reason the session is re-established with same slave volume after deleting data on slave volume. > Change-Id: Ie5bc8f008dead637a09495adeef5577e2b33bc90 > BUG: 1422760 > Signed-off-by: Kotresh HR > Reviewed-on: https://review.gluster.org/16629 > NetBSD-regression: NetBSD Build System > CentOS-regression: Gluster Build System > Smoke: Gluster Build System > Reviewed-by: Aravinda VK Change-Id: Ie5bc8f008dead637a09495adeef5577e2b33bc90 BUG: 1422811 Signed-off-by: Kotresh HR (cherry picked from commit 267578ec0d6b29483a1bd402165ea8c388ad825e) Reviewed-on: https://review.gluster.org/16641 Smoke: Gluster Build System CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Aravinda VK --- geo-replication/syncdaemon/master.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py index b65abf98589..6437dcc4295 100644 --- a/geo-replication/syncdaemon/master.py +++ b/geo-replication/syncdaemon/master.py @@ -149,7 +149,9 @@ class NormalMixin(object): xt = _xtime_now() rsc.server.aggregated.set_xtime(path, self.uuid, xt) else: - xt = opts['default_xtime'] + zero_zero = (0, 0) + if xt != zero_zero: + xt = opts['default_xtime'] return xt def keepalive_payload_hook(self, timo, gap): -- cgit