summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon/resource.py
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2015-03-11 13:31:09 +0530
committerVijay Bellur <vbellur@redhat.com>2015-03-15 22:55:31 -0700
commit7d8be3613f7384f5118f26e194fe7c64ea69d11c (patch)
treeb6dcdd9c04ebb8f855e40390165d790ba7fcfa75 /geo-replication/syncdaemon/resource.py
parentf0224ce93ae9ad420e23612fe6e6707a821f9cab (diff)
geo-rep: Do not use xsync_upper_limit for change detection
Use register time(xsync_upper_limit) only for stime update, do not use for change detection. Problem 1: If a file created before geo-rep, xtime xattr does not exist. Geo-rep updates xtime of the file to current time if not exists. xtime > upper_limit so geo-rep will not pick those files. Changelog either will have SETXATTR, and fails to sync the file. Problem 2: If a file is created before geo-rep create and updated after geo-rep start. xtime of the file is greater than upper limit(geo-rep start time/changelog register time). Geo-rep(XSync) will not pick this file for syncing. Changelog will have only DATA recorded for that file. Geo-rep tries DATA without any ENTRY ops and fails with rsync error. BUG: 1200733 Change-Id: Ie4e8f284db689d2c755ef8e7ecbb658db1c0785f Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/9855 Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com> Tested-by: Saravanakumar Arumugam <sarumuga@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon/resource.py')
-rw-r--r--geo-replication/syncdaemon/resource.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py
index e9796fc48f6..ae94f04aa37 100644
--- a/geo-replication/syncdaemon/resource.py
+++ b/geo-replication/syncdaemon/resource.py
@@ -1333,8 +1333,8 @@ class GLUSTER(AbstractUrl, SlaveLocal, SlaveRemote):
g3.crawlwrap(oneshot=True)
else:
g1.crawlwrap(oneshot=True)
- except (ChangelogException, NoPurgeTimeAvailable,
- PartialHistoryAvailable) as e:
+ except (ChangelogException, PartialHistoryAvailable,
+ NoPurgeTimeAvailable) as e:
if isinstance(e, ChangelogException):
logging.info('Changelog history crawl failed, fallback '
'to xsync: %s - %s' % (e.errno, e.strerror))
@@ -1342,8 +1342,7 @@ class GLUSTER(AbstractUrl, SlaveLocal, SlaveRemote):
logging.info('Partial history available, using xsync crawl'
' after consuming history '
'till %s' % str(e))
- g1.crawlwrap(oneshot=True, no_stime_update=True,
- register_time=register_time)
+ g1.crawlwrap(oneshot=True, register_time=register_time)
# crawl loop: Try changelog crawl, if failed
# switch to FS crawl