]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rados: indexless buckets skip init_index/clean_index
authorCasey Bodley <cbodley@redhat.com>
Wed, 8 Jan 2025 21:17:47 +0000 (16:17 -0500)
committerCasey Bodley <cbodley@redhat.com>
Tue, 25 Feb 2025 16:15:57 +0000 (11:15 -0500)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/services/svc_bi_rados.cc

index b34e0c23e608c63610648933070b858e678b16d5..f63ee050680bd9aea4bfc82376a31a1f1ad389ad 100644 (file)
@@ -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;