]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/rgw: sync status ignores shard markers from previous periods
authorCasey Bodley <cbodley@redhat.com>
Tue, 25 Apr 2017 19:32:26 +0000 (15:32 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 26 Apr 2017 12:51:02 +0000 (08:51 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/test/rgw/rgw_multi/tests.py

index 4812df5ae60c4b664feadb51d3b2d8b2a32124f7..beacdc88cad07769d9ccfda7d4b42eccaa20ff66 100644 (file)
@@ -76,7 +76,14 @@ def meta_sync_status(zone):
     log.debug('sync_markers=%s', sync_markers)
     assert(num_shards == len(sync_markers))
 
-    markers = {i: m['val']['marker'] for i, m in enumerate(sync_markers)}
+    markers={}
+    for i in range(num_shards):
+        # get marker, only if it's an incremental marker for the same realm epoch
+        if realm_epoch > sync_markers[i]['val']['realm_epoch'] or sync_markers[i]['val']['state'] == 0:
+            markers[i] = ''
+        else:
+            markers[i] = sync_markers[i]['val']['marker']
+
     return period, realm_epoch, num_shards, markers
 
 def meta_master_log_status(master_zone):