path: root/geo-replication
diff options
authorVenky Shankar <>2013-08-07 16:10:25 +0530
committerAnand Avati <>2013-09-04 20:42:31 -0700
commit9ccdba413ff12956df2221fce91b220300479d23 (patch)
tree9b1ae49555f53c9cc9164661268f8ab3c1cb43e0 /geo-replication
parent07bb6118677119fd21ff38d51b4cefd06c0ad35a (diff)
gsyncd / geo-rep: introduce "recovery" mode
This mode introduces and optimized recovery of master, used during failover-failback cases. Files are only transferred if they are identified as changed on the slave. A normal failback mechanism would be just to reverse the direction of geo-replication syncing. Doing this is the correct way but could be time consuming. "Recovery" mode optimizes this by identifying files (as skipping them) duing the one-shot crawl. NOTE: Use this mode when you are _absolutely_ sure that the namespace on the master is intact, ie. there is number of files in master is equal to the number of files in the slave, but the slave was written to (after a failover) when master was brought back up. - gluster volume geo <MV> <SLAVE>::<SV> config special_sync_mode recover - gluster volume geo <MV> <SLAVE>::<SV> start Change-Id: Idb698949e4e86698b15d04a35d33095562f51714 BUG: 994462 Original Author: Venky Shankar <> Signed-off-by: Venky Shankar <> Reviewed-on: Tested-by: Gluster Build System <> Reviewed-by: Avra Sengupta <> Tested-by: Avra Sengupta <> Reviewed-by: Anand Avati <>
Diffstat (limited to 'geo-replication')
1 files changed, 18 insertions, 1 deletions
diff --git a/geo-replication/syncdaemon/ b/geo-replication/syncdaemon/
index 3b093677..a19fe264 100644
--- a/geo-replication/syncdaemon/
+++ b/geo-replication/syncdaemon/
@@ -157,6 +157,23 @@ class PartialMixin(NormalMixin):
def xtime_reversion_hook(self, path, xtl, xtr):
+class RecoverMixin(NormalMixin):
+ """a variant that differs from normal in terms
+ of ignoring non-indexed files"""
+ @staticmethod
+ def make_xtime_opts(is_master, opts):
+ if not 'create' in opts:
+ opts['create'] = False
+ if not 'default_xtime' in opts:
+ opts['default_xtime'] = URXTIME
+ def keepalive_payload_hook(self, timo, gap):
+ return (None, gap)
+ def volinfo_hook(self):
+ return _volinfo_hook_relax_foreign(self)
# Further mixins for certain tunable behaviors
class SendmarkNormalMixin(object):
@@ -797,7 +814,7 @@ class GMasterChangelogMixin(GMasterCommon):
self.turns += 1
def upd_stime(self, stime):
- if stime:
+ if not stime == URXTIME:
self.sendmark(self.FLAT_DIR_HIERARCHY, stime)
def crawl(self):