fix(kafka): cancel cluster ID fetch goroutine on Close to prevent leak#4531
Conversation
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🔗 Commit SHA: debda11 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files🚀 New features to boost your workflow:
|
BenchmarksBenchmark execution time: 2026-03-12 20:50:11 Comparing candidate commit debda11 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 155 metrics, 9 unstable metrics.
|
ea80cd7 to
b1e5582
Compare
7c42ce7 to
debda11
Compare
9327968
into
rob.carlan/dsm-kafka-cluster-id
Summary
clusterIDCancel/clusterIDDone) with acloseAsync []func()slice on bothConsumerandProducerstartClusterIDFetchhelper that launches the cluster ID fetch goroutine and returns a cancel+wait closure — context cancellation unblocks theClusterIDcall immediately onClose()kafka.NewAdminClientto derivedkafka.NewAdminClientFromConsumer/NewAdminClientFromProducer— eliminatesgo.*config key filteringkafka/(v1) andkafka.v2/(v2)TestConsumerFunctionalWithClusterIDand assertext.MessagingKafkaClusterIDspan tag inTestConsumerFunctionalTo merge in #4470 to fix CI leak