Skip to content

Commit 37e99eb

Browse files
authored
Merge pull request #346 from Altinity/backport/23.8/57822_disable_system_kafka_consumers_table
23.8 Backport of ClickHouse#57822 - Disable `system.kafka_consumers` by default
2 parents d698625 + ecd52ec commit 37e99eb

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)