Skip to content

Commit 8881fb6

Browse files
Backport #57822 to 23.10: Disable system.kafka_consumers by default (due to possible live memory leak)
1 parent 11da8ed commit 8881fb6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Storages/Kafka/StorageKafka.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,10 +661,19 @@ void StorageKafka::updateConfiguration(cppkafka::Configuration & kafka_config,
661661

662662
if (kafka_consumer_weak_ptr_ptr)
663663
{
664+
/// NOTE: statistics should be consumed, otherwise it creates too much
665+
/// entries in the queue, that leads to memory leak and slow shutdown.
666+
///
667+
/// This is the case when you have kafka table but no SELECT from it or
668+
/// materialized view attached.
669+
///
670+
/// So for now it is disabled by default, until properly fixed.
671+
#if 0
664672
if (!config.has(config_prefix + "." + "statistics_interval_ms"))
665673
{
666674
kafka_config.set("statistics.interval.ms", "3000"); // every 3 seconds by default. set to 0 to disable.
667675
}
676+
#endif
668677

669678
if (kafka_config.get("statistics.interval.ms") != "0")
670679
{

0 commit comments

Comments
 (0)