From 6f35610d8b39b38778356b368896273ddc1e0a3a Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 27 Oct 2020 15:21:42 -0700 Subject: [PATCH] rgw: data sync: fix obligation check When async notification arrives the obligation has zero timestamp, which is equal to state->progoress_timestamp. Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_data_sync.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 143e8d1175b9..1241a2b1b37e 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -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{}; -- 2.47.3