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-29 21:16:08 -0800
commit1a0e9f942d9c696195fc948326efb147d791a454 (patch)
tree02e8ed6fddfffd779ed7bfc9ab9b422d6aab5ffb /geo-replication
parent8e468911139c561288dbfefe2bfdcac8c8cc0daa (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: 1399468 Change-Id: I5b73aee7ae4a1c1e2d1001d1f55559b9f9efd6e6 Signed-off-by: Aravinda VK <avishwan@redhat.com> (cherry picked from commit 1876454d2e7950f25d1e5bb8e2c07ab27d521498) Reviewed-on: http://review.gluster.org/15961 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: Kotresh HR <khiremat@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 796b9806f3a..b65abf98589 100644
--- a/geo-replication/syncdaemon/master.py
+++ b/geo-replication/syncdaemon/master.py
@@ -1069,13 +1069,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]