]> git-server-git.apps.pok.os.sepia.ceph.com Git - radosgw-agent.git/commitdiff
incrementalSync will use the new worker_bound behavior
authorAlfredo Deza <adeza@redhat.com>
Tue, 20 Jan 2015 19:09:21 +0000 (14:09 -0500)
committerAlfredo Deza <adeza@redhat.com>
Wed, 28 Jan 2015 18:43:07 +0000 (13:43 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
radosgw_agent/sync.py

index 33e63ca9aec991b6e80e44da977eddf947b4cd6e..d16b1df57e962b71be462c280eae8716a3304b1d 100644 (file)
@@ -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,