summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon/master.py
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2014-05-13 11:56:50 +0530
committerVenky Shankar <vshankar@redhat.com>2014-05-13 10:21:44 -0700
commitba9aec54be5b8f00125ad018618a86de769fb6b5 (patch)
tree6e5d4be6725c72dec37b9fcff15cea3f45127af3 /geo-replication/syncdaemon/master.py
parente64dd0a358e7a7b4c0da86a6b17adf6f125c00d5 (diff)
geo-rep: Changelog History API changes
Additional argument added to API gf_history_changelog, actual_end - The end time till where changelogs are available. Added sort to history_get_changes API output. BUG: 1091961 Change-Id: Id043409882a83cd0a7b9adc3d34d5147d17e532e Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/7747 Reviewed-by: ajeet jha <ajha@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon/master.py')
-rw-r--r--geo-replication/syncdaemon/master.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py
index 1f1fa1122cb..0af21bbe99d 100644
--- a/geo-replication/syncdaemon/master.py
+++ b/geo-replication/syncdaemon/master.py
@@ -1159,10 +1159,11 @@ class GMasterChangeloghistoryMixin(GMasterChangelogMixin):
# location then consuming history will not work(Known issue as of now)
changelog_path = os.path.join(gconf.local_path,
".glusterfs/changelogs")
- ts = self.changelog_agent.history(changelog_path,
- purge_time[0],
- self.changelog_register_time,
- int(gconf.sync_jobs))
+ ret, actual_end = self.changelog_agent.history(
+ changelog_path,
+ purge_time[0],
+ self.changelog_register_time,
+ int(gconf.sync_jobs))
# scan followed by getchanges till scan returns zero.
# history_scan() is blocking call, till it gets the number
@@ -1192,8 +1193,8 @@ class GMasterChangeloghistoryMixin(GMasterChangelogMixin):
# If TS returned from history_changelog is < register_time
# then FS crawl may be required, since history is only available
# till TS returned from history_changelog
- if ts < self.changelog_register_time:
- raise PartialHistoryAvailable(str(ts))
+ if actual_end < self.changelog_register_time:
+ raise PartialHistoryAvailable(str(actual_end))
class GMasterXsyncMixin(GMasterChangelogMixin):