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
[BACKPORT 2024.1][yugabyte#23482] CDCSDK: Add an option to disable dynamic table addition while creating a stream
Summary:
####Backport Description
No merge conflicts were encountered.
####Original Description
This diff adds an option in the yb-admin command `create_change_data_stream` to disable dynamic tables addition on the newly created streams. Dynamic table addition cannot be re-enabled on such streams. By default all the newly created streams will have dynamic tables addition enabled.
In order to create a stream with dynamic tables addition disabled, the user needs to specify the `[<dynamic_tables_option>]` which can take the following values:
- DYNAMIC_TABLES_ENABLED
- DYNAMIC_TABLES_DISABLED
Example to create a stream with dynamic tables disabled:
```
./yb-admin --master_addresses <master-addresses> create_change_data_stream ysql.yugabyte EXPLICIT CHANGE USE_SNAPSHOT DYNAMIC_TABLES_DISABLED
```
For a stream created with dynamic table addition disabled, the field `cdcsdk_disable_dynamic_table_addition` in stream metadata will be set to true.
Dynamic table addition will not be disabled by this mechanism in streams associated with replication slots.
**Upgrade / Rollback safety **
The diff introduces a new message `CDCSDKStreamCreateOptionsPB` in common.proto. This message contains the newly introduced `CDCSDKDynamicTablesOption` as its only field. The message `CDCSDKStreamCreateOptionsPB` is used only in `CreateCDCStreamRequestPB` and should be used for adding more options if required in future.
These changes do not need to be protected by an autoflag for the following reasons:
# The proto changes do not get written to the disk.
# The newly introduced field is optional.
# The proto changes are for yb-admin command related rpcs.
Jira: DB-12399
Original commit: d0dfe63 / D37534
Test Plan:
./yb_build.sh --cxx-test integration-tests_cdcsdk_ysql-test --gtest_filter CDCSDKYsqlTest.TestDisablingDynamicTableAdditionAtStreamCreationTime
./yb_build.sh --cxx-test integration-tests_cdcsdk_ysql-test --gtest_filter CDCSDKYsqlTest.TestDynamicTablesShouldBeEnabledForStreamsWithSlotName
Manual testing
Reviewers: skumar, asrinivasan, siddharth.shah, xCluster, hsunder
Reviewed By: siddharth.shah
Subscribers: ycdcxcluster, ybase, yql
Tags: #jenkins-ready
Differential Revision: https://phorge.dev.yugabyte.com/D37732
0 commit comments