From 939554ec0a62aa5a1b0395a72b95a17be8578d1b Mon Sep 17 00:00:00 2001 From: Ilya Golshtein Date: Sat, 9 Mar 2024 07:52:23 +0000 Subject: [PATCH] contrib: update cppkafka to v0.4.1@9c5ea0e3 --- contrib/cppkafka | 2 +- src/Storages/Kafka/KafkaConsumer.cpp | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/contrib/cppkafka b/contrib/cppkafka index 5a119f689f8..9c5ea0e3324 160000 --- a/contrib/cppkafka +++ b/contrib/cppkafka @@ -1 +1 @@ -Subproject commit 5a119f689f8a4d90d10a9635e7ee2bee5c127de1 +Subproject commit 9c5ea0e332486961e612deacc6e3f0c1874c688d diff --git a/src/Storages/Kafka/KafkaConsumer.cpp b/src/Storages/Kafka/KafkaConsumer.cpp index 47167e19a38..7075dcb71ca 100644 --- a/src/Storages/Kafka/KafkaConsumer.cpp +++ b/src/Storages/Kafka/KafkaConsumer.cpp @@ -599,24 +599,14 @@ void KafkaConsumer::setExceptionInfo(const std::string & text, bool with_stacktr exceptions_buffer.push_back({enriched_text, static_cast(Poco::Timestamp().epochTime())}); } -/* - * Needed until - * https://github.com/mfontanini/cppkafka/pull/309 - * is merged, - * because consumer->get_member_id() contains a leak - */ std::string KafkaConsumer::getMemberId() const { if (!consumer) return ""; - char * memberid_ptr = rd_kafka_memberid(consumer->get_handle()); - std::string memberid_string = memberid_ptr; - rd_kafka_mem_free(nullptr, memberid_ptr); - return memberid_string; + return consumer->get_member_id(); } - KafkaConsumer::Stat KafkaConsumer::getStat() const { KafkaConsumer::Stat::Assignments assignments;