-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BACKPORT 2.20][#18890] CDCSDK: Forward CreateCDCStream requests for …
…CDCSDK streams to YB-Master Summary: **Backport Description** The merge was clean but the revision contains a few more changes that are taken from the https://phorge.dev.yugabyte.com/D30234. These manual changes are required since in the master branch, we earlier declared the flag as an Autoflag and later changed it to a TEST flag. In this 2.20 branch, we want to start with a TEST flag itself. The following manual changes were made: 1. xrepl_catalog_manager.cc - Added `ValidateCDCSDKRequestProperties` function. Updated the code to how it was after https://phorge.dev.yugabyte.com/D30234. 2. src/yb/master/master_xrepl-test.cc - Minor conflicts due to the flag names `ysql_yb_enable_replication_commands` (AutoFlag) and `TEST_ysql_yb_enable_replication_commands` (renamed TEST flag) **Original Description** Original commit: b1727f8 / D29420 Now that yb-master supports creating CDCSDK streams atomically, forward the CreateCDCStream requests to yb-master. This change is guarded by the auto flag `ysql_yb_enable_replication_commands` since we need to ensure that yb-master has the upgraded code before forwarding the request to it. To be able to do this, this diff temporarily removes the restriction that each CreateCDCStream request for a PGSQL database must also have a replication slot name. This restriction will be added back once we've ensured that YSQL layer is the only client making the requests. This change is needed for the consistent snapshot project which will go before the publication/replication slot API. Also fixed an issue with the implementation in yb-master. The `last_replication_time` for entries in the cdc_state_table do not need to be populated for CDCSDK streams as that is used to know whether a client has started streaming or not. It affects our handling of tablet splits. **Upgrade/Rollback safety:** This change adds a new error code field to an enum. This does not need an autoflag since this is a yb-admin - cdc service RPC. Reference ("When do I not need an AutoFlag?" section): https://docs.google.com/document/d/1aFM0NPimXyrFoTGnnspjaaxZdeRBESG332zwpFsPh3A/edit#heading=h.cx5lth8w95ye Jira: DB-7751 Test Plan: Jenkins: test regex: .*CDCSDK.* New test ``` ./yb_build.sh --cxx-test cdcsdk_ysql-test --gtest_filter "*TestCDCStreamCreationDisabledDuringUpgrade*" ./yb_build.sh --cxx-test master_xrepl-test --gtest_filter MasterTestXRepl.TestCreateCDCStreamForNamespaceDisabled ``` Existing CDCSDK tests Reviewers: skumar, asrinivasan, hsunder, xCluster Reviewed By: skumar Subscribers: bogdan, ycdcxcluster, ybase Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D31022
- Loading branch information
Showing
8 changed files
with
164 additions
and
222 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.