ClickHouse/src/Storages/Kafka
Azat Khuzhin 055c231438 Disable system.kafka_consumers by default (due to possible live memory leak)
It is not safe to use statistics because of how KafkaEngine works - it
pre-creates consumers, and this leads to the situation when this
statistics entries generated (RD_KAFKA_OP_STATS), but never consumed.

Which creates a live memory leak for a server with Kafka tables, but
without materialized view attached to it (and no SELECT).

Another problem is that this makes shutdown very slow, because of how
pending queue entries are handled in librdkafka, it uses
TAILQ_INSERT_SORTED, which is sorted insert into linked list, which
works incredibly slow (likely you will never wait till it ends and kill
the server)

For instance in my production setup the server was running for ~67 days
with such table, and it got 1'942'233 `TAILQ_INSERT_SORTED` entries
(which perfectly matches by the way - `67*86400/3` = 1'929'600), and it
moved only 289'806 entries for a few hours, though I'm not sure how much
time the process was in the running state, since most of the time it was
with debugger attached.

So for now let's disable it, to make this patch easy for backporting,
and I will think about long term fix - do not pre-create consumers in
Kafka engine.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-13 18:13:13 +01:00
..
KafkaConsumer.cpp exceptions_kafka_consumers: code review suggestions are addressed 2023-08-24 13:10:21 +00:00
KafkaConsumer.h Allow to save unparsed records and errors in RabbitMQ, NATS and FileLog engines 2023-10-10 16:21:33 +00:00
KafkaProducer.cpp More clang-tidy fixes 2023-09-21 14:40:57 +00:00
KafkaProducer.h Don't use async producing in Kafka 2022-12-30 16:40:04 +00:00
KafkaSettings.cpp
KafkaSettings.h Allow to save unparsed records and errors in RabbitMQ, NATS and FileLog engines 2023-10-10 16:21:33 +00:00
KafkaSource.cpp Allow to save unparsed records and errors in RabbitMQ, NATS and FileLog engines 2023-10-10 16:21:33 +00:00
KafkaSource.h Allow to save unparsed records and errors in RabbitMQ, NATS and FileLog engines 2023-10-10 16:21:33 +00:00
parseSyslogLevel.cpp
parseSyslogLevel.h
StorageKafka.cpp Disable system.kafka_consumers by default (due to possible live memory leak) 2023-12-13 18:13:13 +01:00
StorageKafka.h Merge remote-tracking branch 'origin/master' into minor-improvements-for-s3-queue 2023-11-06 15:51:11 +01:00