Skip to content

Instantly share code, notes, and snippets.

@thuvh
Created March 24, 2025 05:39
Show Gist options
  • Save thuvh/7b68e2535e9ae2d93fde71526e726444 to your computer and use it in GitHub Desktop.
Save thuvh/7b68e2535e9ae2d93fde71526e726444 to your computer and use it in GitHub Desktop.
fix ceph metrics

metric l_rgw_pubsub_push_pending

in http, it's implemented here

with amqp

check function send

  • case ack_level == ack_level_t::None -> increase then decrease
  • case y, increase before line amqp::publish_with_confirm (L216), decrease after check rc < 0
  • case y false, increase before amqp::publish_with_confirm (L228), decrease after amqp::publish_with_confirm (???)

with kafka

check function send

  • case ack_level == ack_level_t::None -> increase then decrease
  • case y, increase before line kafka::publish_with_confirm (L302), decrease after check rc < 0
  • case y false, increase before kafka::publish_with_confirm (L313), decrease after amqp::publish_with_confirm (???)

metric l_rgw_pubsub_push_failed

is implemented here

@yuvalif
Copy link

yuvalif commented Mar 24, 2025

for both kafka and amqp you have to change the code a little (for both y and not y):

const auto rc = w.async_wait(yield);
if (perfcounter) perfcounter->dec(l_rgw_pubsub_push_pending);
return rc;

and

const auto rc =  w.wait();
if (perfcounter) perfcounter->dec(l_rgw_pubsub_push_pending);
return rc;

regarding l_rgw_pubsub_push_failed you will have to add it to the persistent case only when we give up on the notification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment