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