From c7774831d5c4c426ca3bdf6f4851d7309d92cc33 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Wed, 8 Jan 2025 16:17:47 -0500 Subject: [PATCH] rgw/rados: indexless buckets skip init_index/clean_index Signed-off-by: Casey Bodley --- src/rgw/services/svc_bi_rados.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/rgw/services/svc_bi_rados.cc b/src/rgw/services/svc_bi_rados.cc index b34e0c23e608c..f63ee050680bd 100644 --- a/src/rgw/services/svc_bi_rados.cc +++ b/src/rgw/services/svc_bi_rados.cc @@ -358,6 +358,10 @@ int RGWSI_BucketIndex_RADOS::init_index(const DoutPrefixProvider *dpp, const rgw::bucket_index_layout_generation& idx_layout, bool judge_support_logrecord) { + if (idx_layout.layout.type != rgw::BucketIndexType::Normal) { + return 0; + } + librados::IoCtx index_pool; string dir_oid = dir_oid_prefix; @@ -386,6 +390,10 @@ int RGWSI_BucketIndex_RADOS::init_index(const DoutPrefixProvider *dpp, int RGWSI_BucketIndex_RADOS::clean_index(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw::bucket_index_layout_generation& idx_layout) { + if (idx_layout.layout.type != rgw::BucketIndexType::Normal) { + return 0; + } + librados::IoCtx index_pool; std::string dir_oid = dir_oid_prefix; -- 2.39.5