From: Yuri Weinstein Date: Thu, 20 Mar 2025 14:34:17 +0000 (-0700) Subject: Merge pull request #60952 from igomon-bloomberg/wip-65912-squid X-Git-Tag: v19.2.3~277 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=711809256f0d02f3debfb501e4b404e7d7031db6;p=ceph.git Merge pull request #60952 from igomon-bloomberg/wip-65912-squid squid: rgw/s3-notifications: use user-name/password topic attributes for SASL authentication Reviewed-by: Yuval Lifshitz --- 711809256f0d02f3debfb501e4b404e7d7031db6 diff --cc src/rgw/rgw_kafka.cc index 7420e68c2644,dbb22dcb5689..dbc893d70c9d --- a/src/rgw/rgw_kafka.cc +++ b/src/rgw/rgw_kafka.cc @@@ -389,12 -385,13 +389,12 @@@ private } // create a new topic unless it was already created - auto topic_it = std::find(conn->topics.begin(), conn->topics.end(), message->topic); - rd_kafka_topic_t* topic = nullptr; + auto topic_it = conn->topics.find(message->topic); if (topic_it == conn->topics.end()) { - topic = rd_kafka_topic_new(conn->producer, message->topic.c_str(), nullptr); + connection_t::topic_ptr topic(rd_kafka_topic_new(conn->producer, message->topic.c_str(), nullptr)); if (!topic) { const auto err = rd_kafka_last_error(); - ldout(conn->cct, 1) << "Kafka publish: failed to create topic: " << message->topic << " error: " + ldout(conn->cct, 1) << "Kafka publish: failed to create topic: " << message->topic << " error: " << rd_kafka_err2str(err) << "(" << err << ")" << dendl; if (message->cb) { message->cb(-rd_kafka_err2errno(err));