]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/kafka: make sure that destroy is called after connection is removed 53515/head
authorYuval Lifshitz <ylifshit@redhat.com>
Thu, 1 Jun 2023 06:13:06 +0000 (06:13 +0000)
committerYuval Lifshitz <ylifshit@redhat.com>
Mon, 18 Sep 2023 16:50:43 +0000 (16:50 +0000)
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 <ylifshit@redhat.com>
(cherry picked from commit 60412d6ab19f2ae42bdfaeaae0ff23dc011176ff)

Conflicts:
src/rgw/rgw_kafka.cc

src/rgw/rgw_kafka.cc

index 651d7099ebc58bedc7f9132e952e1dbbe4fcc0ec..fbb0313d1e448f2b6b05746bd198bbc72fd81df5 100644 (file)
@@ -94,10 +94,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 {
@@ -458,7 +460,7 @@ private:
 
         // Checking the connection idlesness
         if(conn->timestamp.sec() + max_idle_time < ceph_clock_now()) {
-          ldout(conn->cct, 20) << "Time for deleting a connection due to idle behaviour: " << ceph_clock_now() << dendl;
+          ldout(conn->cct, 20) << "kafka run: deleting a connection due to idle behaviour: " << ceph_clock_now() << dendl;
           std::lock_guard lock(connections_lock);
           ERASE_AND_CONTINUE(conn_it, connections);
         }