You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add message_queue_disable_insertion server setting to disable insertion from message queue engines (Kafka, RabbitMQ, NATS) into attached materialized views. Useful for read-only replica scenarios.
Why: Previously, read-only nodes could rely on the disable_insertion_and_mutation server setting to block data ingestion from Kafka tables. After ClickHouse PR #88549, disable_insertion_and_mutation no longer provides this functionality. To support read-only nodes, the new server setting message_queue_disable_insertion has been added to enable blocking data ingestion from Kafka tables.
This PR adds message_queue_disable_insertion as a reloadable server setting, applies it in InterpreterInsertQuery::execute only for message-queue internal streaming (no_destination path), and adds integration coverage for Kafka/RabbitMQ plus a non-regression check for S3Queue. I reviewed the current diff and all prior discussion threads; previously raised issues are addressed, and I did not find remaining correctness, safety, or performance concerns.
Hi @JiaQiTang98 — a quick suggestion to make this PR easier for reviewers and the changelog reader.
Description (currently incomplete):
Why: The PR body is effectively empty (no description beyond the template). While the changelog entry is good, the body should explain the motivation and design decisions.
Suggested addition:
This setting is useful for read-only replica scenarios where the server should not consume messages from external queues into materialized views, but direct writes to the queues (INSERT INTO kafka_table) should still be allowed. When enabled, the streaming background task throws QUERY_IS_PROHIBITED and reschedules, similar to how s3queue_disable_streaming works for S3Queue.
Ignore this if the current title/body is intentional.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Add
message_queue_disable_insertionserver setting to disable insertion from message queue engines (Kafka, RabbitMQ, NATS) into attached materialized views. Useful for read-only replica scenarios.Why: Previously, read-only nodes could rely on the
disable_insertion_and_mutationserver setting to block data ingestion from Kafka tables. After ClickHouse PR #88549,disable_insertion_and_mutationno longer provides this functionality. To support read-only nodes, the new server settingmessage_queue_disable_insertionhas been added to enable blocking data ingestion from Kafka tables.