From: Casey Bodley Date: Fri, 11 Mar 2022 00:03:59 +0000 (-0500) Subject: rgw: disable RGWDataChangesLog::add_entry() when log_data is off X-Git-Tag: v19.0.0~1121^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4e730d0fcb108a5a94c24f6e0eb660a59742e47d;p=ceph.git rgw: disable RGWDataChangesLog::add_entry() when log_data is off this restores a check for RGWZone::log_data in add_entry(). with per-bucket replication, this check was replaced by a call to `RGWBucketSyncPolicyHandler::bucket_exports_data()` this call has to consult two rados objects, `bucket.sync-source-hints.` and `bucket.sync-target-hints.` but if the zone is not configured for multisite, we should avoid these extra object reads and return early Fixes: https://tracker.ceph.com/issues/61300 Signed-off-by: Casey Bodley --- diff --git a/src/rgw/driver/rados/rgw_datalog.cc b/src/rgw/driver/rados/rgw_datalog.cc index 7ca37abf6848..2bd4669ab56a 100644 --- a/src/rgw/driver/rados/rgw_datalog.cc +++ b/src/rgw/driver/rados/rgw_datalog.cc @@ -640,6 +640,10 @@ int RGWDataChangesLog::add_entry(const DoutPrefixProvider *dpp, const rgw::bucket_log_layout_generation& gen, int shard_id, optional_yield y) { + if (!zone->log_data) { + return 0; + } + auto& bucket = bucket_info.bucket; if (!filter_bucket(dpp, bucket, y)) {