Skip to content

Commit ecd52ec

Browse files
alexey-milovidovEnmk
authored andcommitted
Merge pull request ClickHouse#57822 from azat/kafka-disable-stat
Disable system.kafka_consumers by default (due to possible live memory leak)
1 parent d698625 commit ecd52ec

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
@@ -660,10 +660,19 @@ void StorageKafka::updateConfiguration(cppkafka::Configuration & kafka_config,
660660

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

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

0 commit comments

Comments
 (0)