Skip to content

Commit 4e730d0

Browse files
committed
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.<bucketname>` and `bucket.sync-target-hints.<bucketname>` 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 <[email protected]>
1 parent 2727096 commit 4e730d0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/rgw/driver/rados/rgw_datalog.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,10 @@ int RGWDataChangesLog::add_entry(const DoutPrefixProvider *dpp,
640640
const rgw::bucket_log_layout_generation& gen,
641641
int shard_id, optional_yield y)
642642
{
643+
if (!zone->log_data) {
644+
return 0;
645+
}
646+
643647
auto& bucket = bucket_info.bucket;
644648

645649
if (!filter_bucket(dpp, bucket, y)) {

0 commit comments

Comments
 (0)