From 301e4e8366759c45aaff03a7953ab5248b5f61de Mon Sep 17 00:00:00 2001 From: Milind Changire Date: Fri, 22 Apr 2016 16:56:47 +0530 Subject: georep: add reset-sync-time option for session delete Set the stime xattr at all the brick roots to (0,0) if the argument reset-sync-time has been provided on the command-line. To avoid testing against directory specific stime, the remote stime is assumed to be minus_infinity, if the root directory stime is set to (0,0), before the directory scan begins. This triggers a full volume resync to slave in the case of a geo-rep session recreation with the same master-slave volume pair. Command synopsis: gluster volume geo-replication :: delete \ [reset-sync-time] Update gluster cli man page to include new sub-command reset-sync-time. Change-Id: Ie4ce03b9425ed9bb81eda8681058c0fc6f990948 BUG: 1357772 Signed-off-by: Milind Changire Reviewed-on: http://review.gluster.org/14051 Reviewed-by: Kotresh HR Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Aravinda VK (cherry picked from commit 70fd68d94f768c098b3178c151fa92c5079a8cfd) Reviewed-on: http://review.gluster.org/14952 --- geo-replication/syncdaemon/master.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'geo-replication/syncdaemon/master.py') diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py index be68a7fd7b4..80c4d9d8b95 100644 --- a/geo-replication/syncdaemon/master.py +++ b/geo-replication/syncdaemon/master.py @@ -1377,6 +1377,9 @@ class GMasterXsyncMixin(GMasterChangelogMixin): "correct xtime for %s (%d)" % (path, xtr)) xtr = self.minus_infinity xtr = max(xtr, xtr_root) + zero_zero = (0, 0) + if xtr_root == zero_zero: + xtr = self.minus_infinity if not self.need_sync(path, xtl, xtr): if path == '.': self.sync_done([(path, xtl)], True) -- cgit