]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: data sync: fix obligation check 37882/head
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 27 Oct 2020 22:21:42 +0000 (15:21 -0700)
committerCasey Bodley <cbodley@redhat.com>
Wed, 28 Oct 2020 17:13:53 +0000 (13:13 -0400)
When async notification arrives the obligation has zero
timestamp, which is equal to state->progoress_timestamp.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_data_sync.cc

index 143e8d1175b9096a69519ffae34be937a71bc61d..1241a2b1b37e7168bdf76775517879b8d5398f73 100644 (file)
@@ -1296,7 +1296,8 @@ public:
 
         // loop until the latest obligation is satisfied, because other callers
         // may update the obligation while we're syncing
-        while (state->progress_timestamp < state->obligation->timestamp &&
+        while ((state->obligation->timestamp == ceph::real_time() ||
+                state->progress_timestamp < state->obligation->timestamp) &&
                obligation_counter != state->counter) {
           obligation_counter = state->counter;
           progress = ceph::real_time{};