]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/multisite: add 'deleted' as a RGWBucketInfo flag
authorShilpa Jagannath <smanjara@redhat.com>
Tue, 21 Nov 2023 03:20:46 +0000 (22:20 -0500)
committerShilpa Jagannath <smanjara@redhat.com>
Fri, 4 Apr 2025 17:16:53 +0000 (13:16 -0400)
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
src/rgw/driver/rados/rgw_rados.cc
src/rgw/rgw_common.cc
src/rgw/rgw_common.h

index eb93d7f37e8b7f892be9f0caab2b5df61b36fedc..287212fc66c85431cafcdde98d0e6f80456ec3c8 100644 (file)
@@ -5613,8 +5613,7 @@ int RGWRados::delete_bucket(RGWBucketInfo& bucket_info, RGWObjVersionTracker& ob
                                       bucket_objs,
                                       cct->_conf->rgw_bucket_index_max_aio)();
   } else {
-    bucket_info.deleted = true;
-    ldpp_dout(dpp, 0) << "setting deleted to: " << bucket_info.deleted << dendl;
+    bucket_info.flags |= BUCKET_DELETED;
     map<string, bufferlist> attrs;
 
     r = ctl.bucket->store_bucket_instance_info(bucket, bucket_info, y, dpp, RGWBucketCtl::BucketInstance::PutParams()
index 5eda2b96f215c35968c4cf2d084f0411664dbc1d..d9b2d1c007b87445edfeb997a39f1f4401f91f57 100644 (file)
@@ -2557,7 +2557,6 @@ void RGWBucketInfo::dump(Formatter *f) const
   encode_json("mdsearch_config", mdsearch_config, f);
   encode_json("reshard_status", (int)reshard_status, f);
   encode_json("new_bucket_instance_id", new_bucket_instance_id, f);
-  encode_json("deleted", deleted, f);
   if (!empty_sync_policy()) {
     encode_json("sync_policy", *sync_policy, f);
   }
@@ -2598,7 +2597,6 @@ void RGWBucketInfo::decode_json(JSONObj *obj) {
   int rs;
   JSONDecoder::decode_json("reshard_status", rs, obj);
   reshard_status = (cls_rgw_reshard_status)rs;
-  JSONDecoder::decode_json("deleted", deleted, obj);
 
   rgw_sync_policy_info sp;
   JSONDecoder::decode_json("sync_policy", sp, obj);
index a4a3a412791c41962422b00e58db7146fe3ba7bd..82e7dad5743c4b59a585b22efb13f8472130e0ad 100644 (file)
@@ -1056,6 +1056,7 @@ enum RGWBucketFlags {
   BUCKET_DATASYNC_DISABLED = 0X8,
   BUCKET_MFA_ENABLED = 0X10,
   BUCKET_OBJ_LOCK_ENABLED = 0X20,
+  BUCKET_DELETED = 0X40,
 };
 
 class RGWSI_Zone;
@@ -1075,7 +1076,6 @@ struct RGWBucketInfo {
   bool has_instance_obj{false};
   RGWObjVersionTracker objv_tracker; /* we don't need to serialize this, for runtime tracking */
   RGWQuotaInfo quota;
-  bool deleted{false};
 
   // layout of bucket index objects
   rgw::BucketLayout layout;
@@ -1116,6 +1116,7 @@ struct RGWBucketInfo {
   bool mfa_enabled() const { return (versioning_status() & BUCKET_MFA_ENABLED) != 0; }
   bool datasync_flag_enabled() const { return (flags & BUCKET_DATASYNC_DISABLED) == 0; }
   bool obj_lock_enabled() const { return (flags & BUCKET_OBJ_LOCK_ENABLED) != 0; }
+  bool bucket_deleted() const { return (flags & BUCKET_DELETED) != 0; }
 
   bool has_swift_versioning() const {
     /* A bucket may be versioned through one mechanism only. */