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] Persist the safe_time from explicit checkpoint in cdc_state table #18116

Closed
adithya-kb opened this issue Jul 6, 2023 · 0 comments
Closed
Assignees
Projects

Comments

@adithya-kb
Copy link

adithya-kb commented Jul 6, 2023

Jira Link: DB-7149

We need to start persisting the "safe_time" (currently passed through the snapshot_time field) which is passed by the connector through the "explicit_cdc_sdk_checkpoint" field of GetChangesRequestPB.
Previously, we only were storing the safe_time when either BEFORE_IMAGE was enabled or when we were in snapshot mode, and we could directly pass the stored value to the tablet_peers to stop compaction. Now since the safe_time is going to be stored always , we need changes in "UpdatePeersAndMetrics", specifically in the method: "PopulateTabletCheckPointInfo", which populates the safe_time to be passed to the tablet_peers. We will now add checks to populate the safe_time to be propogated, only when before image is enabled or when a snapshot_key is present i.e when in snapshot mode.

@adithya-kb adithya-kb created this issue from a note in CDC (To do) Jul 6, 2023
@adithya-kb adithya-kb self-assigned this Jul 6, 2023
@adithya-kb adithya-kb added the area/cdcsdk CDC SDK label Jul 6, 2023
@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue labels Jul 6, 2023
@adithya-kb adithya-kb added 2.18 Backport Required 2.18.0_blocker and removed kind/bug This issue is a bug priority/medium Medium priority issue labels Jul 6, 2023
adithya-kb pushed a commit that referenced this issue Jul 7, 2023
…c_state table

Summary:
We need to start persisting the "safe_time" (currently passed through the snapshot_time field) which is passed by the connector through the
"explicit_cdc_sdk_checkpoint" field of GetChangesRequestPB.
Previously, we only were storing the safe_time when either BEFORE_IMAGE was enabled or when we were in snapshot mode, and we could directly pass the stored
value to the tablet_peers to stop compaction. Now since the safe_time is going to be stored always , we need changes in "UpdatePeersAndMetrics", specifically in
the method: "PopulateTabletCheckPointInfo", which populates the safe_time to be passed to the tablet_peers. We will now add checks to populate the safe_time to
be propogated, only when before image is enabled or when a snapshot_key is present i.e when in snapshot mode.
Jira: DB-7149

Test Plan:
Jenkins: skip
ybd --cxx-test integration-tests_cdcsdk_before_image-test

Reviewers: skumar, vkushwaha

Reviewed By: skumar

Subscribers: ycdcxcluster

Differential Revision: https://phorge.dev.yugabyte.com/D26701
@adithya-kb adithya-kb moved this from To do to In progress in CDC Jul 7, 2023
adithya-kb pushed a commit that referenced this issue Jul 12, 2023
…heckpoint in cdc_state table

Summary:
Original commit: 82ef76c / D26701
We need to start persisting the "safe_time" (currently passed through the snapshot_time field) which is passed by the connector through the
"explicit_cdc_sdk_checkpoint" field of GetChangesRequestPB.
Previously, we only were storing the safe_time when either BEFORE_IMAGE was enabled or when we were in snapshot mode, and we could directly pass the stored
value to the tablet_peers to stop compaction. Now since the safe_time is going to be stored always , we need changes in "UpdatePeersAndMetrics", specifically in
the method: "PopulateTabletCheckPointInfo", which populates the safe_time to be passed to the tablet_peers. We will now add checks to populate the safe_time to
be propogated, only when before image is enabled or when a snapshot_key is present i.e when in snapshot mode.
Jira: DB-7149

Test Plan: ybd --cxx-test integration-tests_cdcsdk_before_image-test

Reviewers: skumar, vkushwaha, aagrawal

Reviewed By: aagrawal

Subscribers: ycdcxcluster

Differential Revision: https://phorge.dev.yugabyte.com/D26859
@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue labels Jul 24, 2023
CDC automation moved this from In progress to Done Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
CDC
  
Done
Development

No branches or pull requests

2 participants