From b09ad6df1f0697cd93ca2e6db3779c45dc19bf3d Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Tue, 20 Jan 2015 14:09:21 -0500 Subject: [PATCH] incrementalSync will use the new worker_bound behavior Signed-off-by: Alfredo Deza --- radosgw_agent/sync.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/radosgw_agent/sync.py b/radosgw_agent/sync.py index 33e63ca..d16b1df 100644 --- a/radosgw_agent/sync.py +++ b/radosgw_agent/sync.py @@ -171,19 +171,21 @@ class Syncer(object): class IncrementalSyncer(Syncer): def get_worker_bound(self, shard_num): - try: - marker, timestamp, retries = client.get_worker_bound( - self.dest_conn, - self.type, - shard_num) - log.debug('oldest marker and time for shard %d are: %r %r', - shard_num, marker, timestamp) - log.debug('%d items to retrie are: %r', len(retries), retries) - except NotFound: - # if no worker bounds have been set, start from the beginning - marker, retries = '', [] + bound = client.get_worker_bound( + self.dest_conn, + self.type, + shard_num) + + marker = bound['marker'] + retries = bound['retries'] + + log.debug('oldest marker and time for shard %d are: %r %r', + shard_num, marker, bound['oldest_time']) + log.debug('%d items to retrie are: %r', len(retries), retries) + return marker, retries + def get_log_entries(self, shard_num, marker): try: result = client.get_log(self.src_conn, self.type, -- 2.47.3