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

Return snapshot_name in response to CREATE_REPLICATION_SLOT command #21161

Closed
yugabyte-ci opened this issue Feb 23, 2024 · 0 comments
Closed
Assignees
Labels
area/cdcsdk CDC SDK area/ysql Yugabyte SQL (YSQL) jira-originated kind/new-feature This is a request for a completely new feature priority/high High Priority

Comments

@yugabyte-ci
Copy link
Contributor

yugabyte-ci commented Feb 23, 2024

Jira Link: DB-10095

@yugabyte-ci yugabyte-ci added area/cdcsdk CDC SDK area/ysql Yugabyte SQL (YSQL) jira-originated kind/new-feature This is a request for a completely new feature priority/low Low priority status/awaiting-triage Issue awaiting triage labels Feb 23, 2024
@yugabyte-ci yugabyte-ci added priority/high High Priority and removed priority/low Low priority labels Feb 23, 2024
asrinivasanyb added a commit that referenced this issue Feb 25, 2024
…_SLOT command

Summary:
This is related to the project to support Replication slot API in YSQL (#18724).
(https://phorge.dev.yugabyte.com/D29194).
This is also related to the PG Compatible Logical Replication Consumption project.

In response to the CREATE_REPLICATION_SLOT command, the server will send a one-row result set.
One of the fields in this result set is "snapshot_name". In PG, this refers to the identifier of the
snapshot exported by the command. The snapshot consumption then happens through the execution of a
SELECT query as of the consistent state referred to by "snapshot_name". In YB terms, it would be the
equivalent of querying the database with a specified read point.

The YB support for the CREATE_REPLICATION_SLOT command returns the uint64 representation of the
HybridTime corresponding to the consistent snapshot time of the consistent snapshot stream that
was created as part of the CREATE_REPLICATION_SLOT command. This support is added in this revision.

**UPGRADE/ROLLBACK SAFETY:**
These changes are protected via the preview flag: ysql_yb_enable_replication_commands

The following are the PB changes. These are all for RPC responses.

1 yb::master::CreateCDCStreamResponsePB - addition of 1 optional field
2 yb::tserver::PgCreateReplicationSlotResponsePB - addition of 1 optional field
Jira: DB-10095

Test Plan:
```
./yb_build.sh --cxx-test cdcsdk_consistent_snapshot-test
./yb_build.sh --cxx-test cdcsdk_snapshot-test
./yb_build.sh --java-test 'org.yb.pgsql.TestPgRegressReplicationSlot'
./yb_build.sh --java-test 'org.yb.pgsql.TestPgReplicationSlot'
```

```
Added new test
./yb_build.sh --cxx-test integration-tests_cdcsdk_consistent_snapshot-test --gtest_filter CDCSDKConsistentSnapshotTest.TestSnapshotNameFromCreateReplicationSlot
```

Reviewers: skumar, stiwary, xCluster, hsunder, aagrawal

Reviewed By: stiwary

Subscribers: ycdcxcluster, ybase, yql, bogdan

Differential Revision: https://phorge.dev.yugabyte.com/D32610
@yugabyte-ci yugabyte-ci removed the status/awaiting-triage Issue awaiting triage label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cdcsdk CDC SDK area/ysql Yugabyte SQL (YSQL) jira-originated kind/new-feature This is a request for a completely new feature priority/high High Priority
Projects
None yet
Development

No branches or pull requests

2 participants