Skip to content

Commit 2f8a715

Browse files
authored
Merge pull request ceph#51864 from yuvalif/wip-yuval-fix-61540
rgw/kafka: make sure that destroy is called after connection is removed
2 parents 9912707 + 60412d6 commit 2f8a715

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/rgw/rgw_kafka.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,12 @@ struct connection_t {
100100
// fire all remaining callbacks (if not fired by rd_kafka_flush)
101101
std::for_each(callbacks.begin(), callbacks.end(), [this](auto& cb_tag) {
102102
cb_tag.cb(status);
103-
ldout(cct, 20) << "Kafka destroy: invoking callback with tag=" << cb_tag.tag << dendl;
103+
ldout(cct, 20) << "Kafka destroy: invoking callback with tag=" << cb_tag.tag <<
104+
" for: " << broker << dendl;
104105
});
105106
callbacks.clear();
106107
delivery_tag = 1;
108+
ldout(cct, 20) << "Kafka destroy: complete for: " << broker << dendl;
107109
}
108110

109111
bool is_ok() const {
@@ -459,7 +461,6 @@ class Manager {
459461
// Checking the connection idlesness
460462
if(conn->timestamp.sec() + max_idle_time < ceph_clock_now()) {
461463
ldout(conn->cct, 20) << "kafka run: deleting a connection due to idle behaviour: " << ceph_clock_now() << dendl;
462-
conn->destroy(STATUS_CONNECTION_IDLE);
463464
std::lock_guard lock(connections_lock);
464465
conn_it = connections.erase(conn_it);
465466
--connection_count; \

0 commit comments

Comments
 (0)