From 05a3cbde216248d37559403f54736b6b8f69f806 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 18 Jun 2026 11:29:39 -0400 Subject: [PATCH] rgw: s3 DeleteObjects api increments delete op counters rgw tracks perf counters for delete ops, but they didn't cover the multi-delete api. each call to `handle_individual_object()` now emits the same metrics as a call to the s3 DeleteObject api Fixes: https://tracker.ceph.com/issues/77505 Signed-off-by: Casey Bodley --- src/rgw/rgw_op.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index bfcb0ea6df1f..64991b75baa6 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -8179,6 +8179,9 @@ void RGWDeleteMultiObj::handle_individual_object(const RGWMultiDelObject& object } prefix{*this, o}; const DoutPrefixProvider* dpp = &prefix; + using Clock = ceph::coarse_real_clock; + const auto started_at = Clock::now(); + std::unique_ptr obj = bucket->get_object(o); if (o.empty()) { send_partial_response(o, false, "", -EINVAL); @@ -8275,6 +8278,11 @@ void RGWDeleteMultiObj::handle_individual_object(const RGWMultiDelObject& object } send_partial_response(o, del_op->result.delete_marker, del_op->result.version_id, r); + + auto counters = rgw::op_counters::get(s); + rgw::op_counters::inc(counters, l_rgw_op_del_obj, 1); + rgw::op_counters::inc(counters, l_rgw_op_del_obj_b, obj_size); + rgw::op_counters::tinc(counters, l_rgw_op_del_obj_lat, Clock::now() - started_at); } void RGWDeleteMultiObj::handle_objects(const std::vector& objects, -- 2.47.3