From 6c8808aa16349d2a6e5497dbe947c1a2106a23d1 Mon Sep 17 00:00:00 2001 From: Sumukh-Phalgaonkar Date: Mon, 23 Dec 2024 16:02:07 +0530 Subject: [PATCH] [#25413] CDC: Enable dynamic table addition by default in logical replication Summary: This revision converts the preview flag `cdcsdk_enable_dynamic_table_support` to a runtime flag with default value `true`. With this revision dynamic table addition will be enabled by default for logical replication. Jira: DB-14644 Test Plan: Existing tests Reviewers: skumar, siddharth.shah Reviewed By: siddharth.shah Subscribers: ycdcxcluster Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D40857 --- .../src/test/java/org/yb/pgsql/TestPgReplicationSlot.java | 7 +------ src/yb/cdc/cdcsdk_virtual_wal.cc | 4 ++-- .../cdcsdk_consumption_consistent_changes-test.cc | 1 - 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgReplicationSlot.java b/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgReplicationSlot.java index 2695fab679db..2c7a1360f1b1 100644 --- a/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgReplicationSlot.java +++ b/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgReplicationSlot.java @@ -71,20 +71,15 @@ protected int getInitialNumTServers() { protected Map getTServerFlags() { Map flagMap = super.getTServerFlags(); if (isTestRunningWithConnectionManager()) { - String preview_flags = "enable_ysql_conn_mgr," + - "cdcsdk_enable_dynamic_table_support"; + String preview_flags = "enable_ysql_conn_mgr"; flagMap.put("allowed_preview_flags_csv",preview_flags); flagMap.put("ysql_conn_mgr_stats_interval", "1"); - } else { - flagMap.put("allowed_preview_flags_csv", - "cdcsdk_enable_dynamic_table_support"); } flagMap.put( "vmodule", "cdc_service=4,cdcsdk_producer=4,ybc_pggate=4,cdcsdk_virtual_wal=4,client=4"); flagMap.put("ysql_log_min_messages", "DEBUG2"); flagMap.put( "cdcsdk_publication_list_refresh_interval_secs","" + kPublicationRefreshIntervalSec); - flagMap.put("cdcsdk_enable_dynamic_table_support", "true"); flagMap.put("cdc_send_null_before_image_if_not_exists", "true"); return flagMap; } diff --git a/src/yb/cdc/cdcsdk_virtual_wal.cc b/src/yb/cdc/cdcsdk_virtual_wal.cc index 1dc6faa75d28..26ea935faf2e 100644 --- a/src/yb/cdc/cdcsdk_virtual_wal.cc +++ b/src/yb/cdc/cdcsdk_virtual_wal.cc @@ -68,8 +68,8 @@ DEFINE_test_flag( "Interval in micro seconds at which the table list in the publication will be refreshed. This " "will be used only when cdcsdk_use_microseconds_refresh_interval is set to true"); -DEFINE_RUNTIME_PREVIEW_bool( - cdcsdk_enable_dynamic_table_support, false, +DEFINE_RUNTIME_bool( + cdcsdk_enable_dynamic_table_support, true, "This flag can be used to switch the dynamic addition of tables ON or OFF."); namespace yb { diff --git a/src/yb/integration-tests/cdcsdk_consumption_consistent_changes-test.cc b/src/yb/integration-tests/cdcsdk_consumption_consistent_changes-test.cc index aacf6be352d3..6c95f8c16477 100644 --- a/src/yb/integration-tests/cdcsdk_consumption_consistent_changes-test.cc +++ b/src/yb/integration-tests/cdcsdk_consumption_consistent_changes-test.cc @@ -24,7 +24,6 @@ class CDCSDKConsumptionConsistentChangesTest : public CDCSDKYsqlTest { CDCSDKYsqlTest::SetUp(); ANNOTATE_UNPROTECTED_WRITE(FLAGS_yb_enable_cdc_consistent_snapshot_streams) = true; ANNOTATE_UNPROTECTED_WRITE(FLAGS_ysql_yb_enable_replication_slot_consumption) = true; - ANNOTATE_UNPROTECTED_WRITE(FLAGS_cdcsdk_enable_dynamic_table_support) = true; ANNOTATE_UNPROTECTED_WRITE(FLAGS_enable_cdcsdk_setting_get_changes_response_byte_limit) = true; }