From 672ddc02262b190793dbb87a313a884ffafac1ee 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/54531 Signed-off-by: Casey Bodley (cherry picked from commit 6eec5e35a4f3c8c7e9783e3706e893cabef5993f) --- src/rgw/rgw_datalog.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rgw/rgw_datalog.cc b/src/rgw/rgw_datalog.cc index b52e52000774..7b4cd29afb8b 100644 --- a/src/rgw/rgw_datalog.cc +++ b/src/rgw/rgw_datalog.cc @@ -603,6 +603,10 @@ std::string RGWDataChangesLog::get_oid(uint64_t gen_id, int i) const { } int RGWDataChangesLog::add_entry(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, int shard_id) { + if (!zone->log_data) { + return 0; + } + auto& bucket = bucket_info.bucket; if (!filter_bucket(dpp, bucket, null_yield)) { -- 2.47.3