diff options
author | Shilpa Jagannath <smanjara@redhat.com> | 2024-09-03 09:16:09 +0200 |
---|---|---|
committer | Shilpa Jagannath <smanjara@redhat.com> | 2024-09-26 19:39:20 +0200 |
commit | a191f9a6d2997f655f580e16731615e77350a03d (patch) | |
tree | d684675add66f7a4d547c905f26883d2b0436bc4 | |
parent | Merge pull request #59185 from NitzanMordhai/wip-nitzan-crimson-help-args (diff) | |
download | ceph-a191f9a6d2997f655f580e16731615e77350a03d.tar.xz ceph-a191f9a6d2997f655f580e16731615e77350a03d.zip |
rgw/multisite: avoid redundant error repo entry logging
in bucket incremental sync, if a generation other than the current generation is requested,
we mark it with -EAGAIN and retry in error repo in RGWDataSyncSingleEntry(). within this block,
we check if that requested generation is lesser than the current gen, write it to error repo,
set -EAGAIN and write it to error repo in the outer function once again. don't duplicate error
repo entry addition for this condition.
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
-rw-r--r-- | src/rgw/driver/rados/rgw_data_sync.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rgw/driver/rados/rgw_data_sync.cc b/src/rgw/driver/rados/rgw_data_sync.cc index 58f5cd0690c..6e30eb1d237 100644 --- a/src/rgw/driver/rados/rgw_data_sync.cc +++ b/src/rgw/driver/rados/rgw_data_sync.cc @@ -6044,12 +6044,13 @@ int RGWSyncBucketCR::operate(const DoutPrefixProvider *dpp) } else { tn->log(20, SSTR("logged prev gen entry (bucket=" << source_bs.bucket << ", shard_id=" << source_bs.shard_id << ", gen=" << current_gen << " in error repo: retcode=" << retcode)); } - } + } else { retcode = -EAGAIN; tn->log(10, SSTR("ERROR: requested sync of future generation " << *gen << " > " << current_gen << ", returning " << retcode << " for later retry")); return set_cr_error(retcode); + } } else if (*gen < current_gen) { tn->log(10, SSTR("WARNING: requested sync of past generation " << *gen << " < " << current_gen |