summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2012-01-05 02:01:00 +0100
committerVijay Bellur <vijay@gluster.com>2012-04-12 10:17:54 -0700
commitdeea482deff52251f9fe39bc3bda09f58397cb06 (patch)
tree83a2be6f52c07a71c0ec56e958f5868750a53ec8
parent326747aa892de2e345d7d74d76314d3f696430bb (diff)
geo-rep: gsyncd: fix up fallback xtime for orphans on master sidev3.2.7qa1
Change-Id: I2fa543b4bd317e06ea621ae968300ffb7223a68a BUG: 771787 Signed-off-by: Csaba Henk <csaba@gluster.com> Reviewed-on: http://review.gluster.com/2580 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushik BV <kaushikbv@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com> Reviewed-on: http://review.gluster.com/3103
-rw-r--r--xlators/features/marker/utils/syncdaemon/master.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/master.py b/xlators/features/marker/utils/syncdaemon/master.py
index fca6fc73306..8f749bc302e 100644
--- a/xlators/features/marker/utils/syncdaemon/master.py
+++ b/xlators/features/marker/utils/syncdaemon/master.py
@@ -58,14 +58,15 @@ class GMaster(object):
if isinstance(xt, int) and xt != ENODATA:
return xt
invalid_xtime = (xt == ENODATA or xt < self.volmark)
- if invalid_xtime and opts['create']:
- t = time.time()
- sec = int(t)
- nsec = int((t - sec) * 1000000)
- xt = (sec, nsec)
- rsc.server.set_xtime(path, self.uuid, xt)
if invalid_xtime:
- xt = opts['default_xtime']
+ if opts['create']:
+ t = time.time()
+ sec = int(t)
+ nsec = int((t - sec) * 1000000)
+ xt = (sec, nsec)
+ rsc.server.set_xtime(path, self.uuid, xt)
+ else:
+ xt = opts['default_xtime']
return xt
def __init__(self, master, slave):