summaryrefslogtreecommitdiffstats
path: root/geo-replication
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2016-11-17 17:47:29 +0530
committerAravinda VK <avishwan@redhat.com>2016-12-02 00:21:54 -0800
commitf1ef6b0c1e5d6f0f7eb67e85b3837c0cf33642c9 (patch)
treea7191b5369a2ac88df192642da9b5d4c7caf53b4 /geo-replication
parenta70306805d1f1ce21c1c718c3532731d3ca4184a (diff)
geo-rep: Fix Last synced status column issue during Hybrid Crawl
During Hybrid crawl, Geo-rep maintains stime xattr in subdirectories along with the Brick root. This is done to skip directories if Geo-rep crashes before Hybrid crawl completes. Update Last synced status only when stime xattr updated in brick root. Status output will mislead if it shows sub directory stime as last synced time. > Reviewed-on: http://review.gluster.org/15869 > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Smoke: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Kotresh HR <khiremat@redhat.com> BUG: 1399470 Change-Id: I5b73aee7ae4a1c1e2d1001d1f55559b9f9efd6e6 Signed-off-by: Aravinda VK <avishwan@redhat.com> (cherry picked from commit 1876454d2e7950f25d1e5bb8e2c07ab27d521498) Reviewed-on: http://review.gluster.org/15962 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com>
Diffstat (limited to 'geo-replication')
-rw-r--r--geo-replication/syncdaemon/master.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py
index 2c4d8c581a4..d2481ee06ec 100644
--- a/geo-replication/syncdaemon/master.py
+++ b/geo-replication/syncdaemon/master.py
@@ -1139,13 +1139,15 @@ class GMasterChangelogMixin(GMasterCommon):
self.sendmark(path, stime)
# Update last_synced_time in status file based on stime
- chkpt_time = gconf.configinterface.get_realtime(
- "checkpoint")
- checkpoint_time = 0
- if chkpt_time is not None:
- checkpoint_time = int(chkpt_time)
-
- self.status.set_last_synced(stime, checkpoint_time)
+ # only update stime if stime xattr set to Brick root
+ if path == self.FLAT_DIR_HIERARCHY:
+ chkpt_time = gconf.configinterface.get_realtime(
+ "checkpoint")
+ checkpoint_time = 0
+ if chkpt_time is not None:
+ checkpoint_time = int(chkpt_time)
+
+ self.status.set_last_synced(stime, checkpoint_time)
def update_worker_remote_node(self):
node = sys.argv[-1]