summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/utils/syncdaemon/master.py
diff options
context:
space:
mode:
authorVenky Shankar <venky@gluster.com>2011-09-13 22:11:33 +0530
committerVijay Bellur <vijay@gluster.com>2011-09-20 10:32:55 -0700
commitb30f66e20d830daec057075d67f181e904984a27 (patch)
treebd65582f16521ab909b23dd52ed4366b74b526eb /xlators/features/marker/utils/syncdaemon/master.py
parente8b81f72d7a45ce443e72c45ae68952911deac50 (diff)
geo-rep: gsyncd: add --ignore-deletes option
When this option is set, a file deleted on master will not trigger a delete operation on the slave. Hence, the slave will remain as a superset of the master and can be used to recover the master in case of crash and/or accidental deletes. This options is not enabled by default. Change-Id: I9244d9dfa4f38f19436036f36bec0d9c3a1f7993 BUG: 3552 Reviewed-on: http://review.gluster.com/426 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Csaba Henk <csaba@gluster.com>
Diffstat (limited to 'xlators/features/marker/utils/syncdaemon/master.py')
-rw-r--r--xlators/features/marker/utils/syncdaemon/master.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/master.py b/xlators/features/marker/utils/syncdaemon/master.py
index de4b32421..9e54dc4fa 100644
--- a/xlators/features/marker/utils/syncdaemon/master.py
+++ b/xlators/features/marker/utils/syncdaemon/master.py
@@ -9,7 +9,7 @@ from errno import ENOENT, ENODATA
from threading import currentThread, Condition, Lock
from gconf import gconf
-from syncdutils import FreeObject, Thread, GsyncdError
+from syncdutils import FreeObject, Thread, GsyncdError, boolify
URXTIME = (-1, 0)
@@ -346,7 +346,7 @@ class GMaster(object):
self.add_failjob(path, 'remote-entries-fail')
return
dd = set(des) - set(dem)
- if dd:
+ if dd and not boolify(gconf.ignore_deletes):
self.slave.server.purge(path, dd)
chld = []
for e in dem: