From: shreyanshjain7174 Date: Tue, 17 Oct 2023 06:55:42 +0000 (+0200) Subject: RadosGW: RGW Swift info not providing max_deletes_per_request in bulk_delete section X-Git-Tag: v19.0.0~156^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=afba0ffbf5ce50d41150c783b24a1d16b7361249;p=ceph.git RadosGW: RGW Swift info not providing max_deletes_per_request in bulk_delete section RGW implements the info endpoint for the Swift protocol which presents a key knowns as bulk_delete, but upon doing swift info the max_deletes_per_request is not shown which is necessary for user to ge the information of a global paramter rgw_delete_multi_obj_max_num in radosgw. Fixes: https://tracker.ceph.com/issues/62646 Signed-off-by: shreyanshjain7174 --- diff --git a/src/rgw/rgw_rest_swift.cc b/src/rgw/rgw_rest_swift.cc index 1f9657111599..6efc7bd8e1cb 100644 --- a/src/rgw/rgw_rest_swift.cc +++ b/src/rgw/rgw_rest_swift.cc @@ -1818,7 +1818,7 @@ void RGWGetHealthCheck_ObjStore_SWIFT::send_response() const vector> RGWInfo_ObjStore_SWIFT::swift_info = { - {"bulk_delete", {false, nullptr}}, + {"bulk_delete", {false, RGWInfo_ObjStore_SWIFT::list_bulk_delete}}, {"container_quotas", {false, nullptr}}, {"swift", {false, RGWInfo_ObjStore_SWIFT::list_swift_data}}, {"tempurl", { false, RGWInfo_ObjStore_SWIFT::list_tempurl_data}}, @@ -1870,6 +1870,16 @@ void RGWInfo_ObjStore_SWIFT::send_response() rgw_flush_formatter_and_reset(s, s->formatter); } +void RGWInfo_ObjStore_SWIFT::list_bulk_delete(Formatter& formatter, + const ConfigProxy& config, + rgw::sal::Driver* driver) +{ + formatter.open_object_section("bulk_delete"); + formatter.dump_int("max_deletes_per_request", config->rgw_delete_multi_obj_max_num); + formatter.close_section(); + +} + void RGWInfo_ObjStore_SWIFT::list_swift_data(Formatter& formatter, const ConfigProxy& config, rgw::sal::Driver* driver) diff --git a/src/rgw/rgw_rest_swift.h b/src/rgw/rgw_rest_swift.h index 25b20a9700d1..08b5a77dabbe 100644 --- a/src/rgw/rgw_rest_swift.h +++ b/src/rgw/rgw_rest_swift.h @@ -238,6 +238,7 @@ public: void execute(optional_yield y) override; void send_response() override; + static void list_bulk_delete(Formatter& formatter, const ConfigProxy& config, rgw::sal::Driver* driver); static void list_swift_data(Formatter& formatter, const ConfigProxy& config, rgw::sal::Driver* driver); static void list_tempauth_data(Formatter& formatter, const ConfigProxy& config, rgw::sal::Driver* driver); static void list_tempurl_data(Formatter& formatter, const ConfigProxy& config, rgw::sal::Driver* driver);