Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CDCSDK] Provide an upgrade path to migrate existing CDCSDK streams to Replication Slot #19261

Open
1 task done
dr0pdb opened this issue Sep 25, 2023 · 0 comments
Open
1 task done
Assignees
Labels
area/cdcsdk CDC SDK kind/enhancement This is an enhancement of an existing feature priority/high High Priority

Comments

@dr0pdb
Copy link
Contributor

dr0pdb commented Sep 25, 2023

Jira Link: DB-8057

Description

Once we support the PG model of Publication/Replication Slot, we need to provide a way to migrate existing CDCSDK streams to Replication Slot.

Source connector version

NA

Connector configuration

NA

YugabyteDB version

No response

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.
@dr0pdb dr0pdb added priority/high High Priority area/cdcsdk CDC SDK labels Sep 25, 2023
@dr0pdb dr0pdb self-assigned this Sep 25, 2023
@yugabyte-ci yugabyte-ci added the kind/enhancement This is an enhancement of an existing feature label Sep 25, 2023
dr0pdb added a commit that referenced this issue Dec 4, 2023
…g CDC streams

Summary:
This revision introduces a new yb-admin CLI command `ysql_backfill_change_data_stream_with_replication_slot` and a master RPC - `YsqlBackfillReplicationSlotNameToCDCSDKStream` which will allow backfilling a replication slot name to an existing CDCSDK stream.

This is to allow users to backfill replication slot names to streams created on older YB versions. Adding the slot name is essential for the stream to be manageable via the YSQL Publication/Replication slot interface.

The RPC is enabled when:
1. Replication Slot support is enabled: `TEST_ysql_yb_enable_replication_commands`
2. `enable_backfilling_cdc_stream_and_replication_slot` is true. This GFlag acts as an indication that this is meant as an upgrade path and should be explicitly enabled for the one-time operation.

**Upgrade/Rollback safety:**
Protected by test flag `TEST_ysql_yb_enable_replication_commands`
Jira: DB-8057

Test Plan:
```
./yb_build.sh --cxx-test master_xrepl-test --gtest_filter MasterTestXRepl.TestYsqlBackfillReplicationSlotNameToCDCSDKStream
./yb_build.sh --cxx-test master_xrepl-test --gtest_filter MasterTestXRepl.TestYsqlBackfillReplicationSlotNameToCDCSDKStreamMissingStreamId
./yb_build.sh --cxx-test master_xrepl-test --gtest_filter MasterTestXRepl.TestYsqlBackfillReplicationSlotNameToCDCSDKStreamMissingReplicationSlotName
./yb_build.sh --cxx-test master_xrepl-test --gtest_filter MasterTestXRepl.TestYsqlBackfillReplicationSlotNameToCDCSDKStreamInvalidStreamId
./yb_build.sh --cxx-test master_xrepl-test --gtest_filter MasterTestXRepl.TestYsqlBackfillReplicationSlotNameToCDCSDKStreamInvalidSlotNames
```

Reviewers: hsunder, skumar, asrinivasan

Reviewed By: skumar

Subscribers: ybase, ycdcxcluster, bogdan

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D30424
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cdcsdk CDC SDK kind/enhancement This is an enhancement of an existing feature priority/high High Priority
Projects
None yet
Development

No branches or pull requests

2 participants