From 60412d6ab19f2ae42bdfaeaae0ff23dc011176ff Mon Sep 17 00:00:00 2001 From: Yuval Lifshitz Date: Thu, 1 Jun 2023 06:13:06 +0000 Subject: [PATCH] rgw/kafka: make sure that destroy is called after connection is removed in addition. the dtor calls "destroy()", so there is no need to call it explictly Fixes: https://tracker.ceph.com/issues/61540 Signed-off-by: Yuval Lifshitz --- src/rgw/rgw_kafka.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_kafka.cc b/src/rgw/rgw_kafka.cc index 88b4f16932a..7bb65aef587 100644 --- a/src/rgw/rgw_kafka.cc +++ b/src/rgw/rgw_kafka.cc @@ -100,10 +100,12 @@ struct connection_t { // fire all remaining callbacks (if not fired by rd_kafka_flush) std::for_each(callbacks.begin(), callbacks.end(), [this](auto& cb_tag) { cb_tag.cb(status); - ldout(cct, 20) << "Kafka destroy: invoking callback with tag=" << cb_tag.tag << dendl; + ldout(cct, 20) << "Kafka destroy: invoking callback with tag=" << cb_tag.tag << + " for: " << broker << dendl; }); callbacks.clear(); delivery_tag = 1; + ldout(cct, 20) << "Kafka destroy: complete for: " << broker << dendl; } bool is_ok() const { @@ -459,7 +461,6 @@ private: // Checking the connection idlesness if(conn->timestamp.sec() + max_idle_time < ceph_clock_now()) { ldout(conn->cct, 20) << "kafka run: deleting a connection due to idle behaviour: " << ceph_clock_now() << dendl; - conn->destroy(STATUS_CONNECTION_IDLE); std::lock_guard lock(connections_lock); conn_it = connections.erase(conn_it); --connection_count; \ -- 2.39.5