From 4e730d0fcb108a5a94c24f6e0eb660a59742e47d Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 10 Mar 2022 19:03:59 -0500 Subject: [PATCH] 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 --- src/rgw/driver/rados/rgw_datalog.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rgw/driver/rados/rgw_datalog.cc b/src/rgw/driver/rados/rgw_datalog.cc index 7ca37abf68484..2bd4669ab56a0 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)) { -- 2.39.5