feat(sink): Add config to block table drop if incoming sinks exist #22347
+37
−8
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.
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Introduce
protect_drop_table_with_incoming_sink
Configuration OptionSummary
This pull request adds a new configuration option,
protect_drop_table_with_incoming_sink
, to theMetaConfig
struct inconfig.rs
. By default, this option is set tofalse
, allowing the drop operation on tables without restrictions. However, when enabled, it prevents the dropping of tables that are currently in use by incoming sinks within the Catalog Controller, as implemented indrop_op.rs
.Key changes:
protect_drop_table_with_incoming_sink
option toMetaConfig
inconfig.rs
.drop_op.rs
to check for the new configuration and provide a clear error message if a drop operation is attempted on a table used by incoming sinks.MetaOpts
struct inenv.rs
to ensure the new option is configurable.This enhancement not only increases data integrity but also improves user experience by providing informative error messages when avoiding unwanted table drops.
Checklist
Documentation
Release note
Introduce
protect_drop_table_with_incoming_sink
Configuration Option