diff --git a/cdc/generation.cc b/cdc/generation.cc index 0abf903a98..4b00a184ec 100644 --- a/cdc/generation.cc +++ b/cdc/generation.cc @@ -547,6 +547,11 @@ future<> maybe_rewrite_streams_descriptions( co_return; } + if (db.get_config().cdc_dont_rewrite_streams()) { + cdc_log.warn("Stream rewriting disabled. Manual administrator intervention may be required..."); + co_return; + } + // For each CDC log table get the TTL setting (from CDC options) and the table's creation time std::vector times_and_ttls; for (auto& [_, cf] : db.get_column_families()) { diff --git a/db/config.cc b/db/config.cc index d3d1369359..7590821263 100644 --- a/db/config.cc +++ b/db/config.cc @@ -780,6 +780,8 @@ db::config::config(std::shared_ptr exts) "Time period in seconds after which unused schema versions will be evicted from the local schema registry cache. Default is 1 second.") , max_concurrent_requests_per_shard(this, "max_concurrent_requests_per_shard",liveness::LiveUpdate, value_status::Used, std::numeric_limits::max(), "Maximum number of concurrent requests a single shard can handle before it starts shedding extra load. By default, no requests will be shed.") + , cdc_dont_rewrite_streams(this, "cdc_dont_rewrite_streams", value_status::Used, false, + "Disable rewriting streams from cdc_streams_descriptions to cdc_streams_descriptions_v2. Should not be necessary, but the procedure is expensive and prone to failures; this config option is left as a backdoor in case some user requires manual intervention.") , alternator_port(this, "alternator_port", value_status::Used, 0, "Alternator API port") , alternator_https_port(this, "alternator_https_port", value_status::Used, 0, "Alternator API HTTPS port") , alternator_address(this, "alternator_address", value_status::Used, "0.0.0.0", "Alternator API listening address") diff --git a/db/config.hh b/db/config.hh index d9dc1f5b61..c9df160fe5 100644 --- a/db/config.hh +++ b/db/config.hh @@ -322,6 +322,7 @@ public: named_value user_defined_function_contiguous_allocation_limit_bytes; named_value schema_registry_grace_period; named_value max_concurrent_requests_per_shard; + named_value cdc_dont_rewrite_streams; named_value alternator_port; named_value alternator_https_port;