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

changefeedccl: re-examine how checkpoints are affected by ALTER CHANGEFEED #137942

Open
andyyang890 opened this issue Dec 23, 2024 · 2 comments
Open
Labels
A-cdc Change Data Capture branch-master Failures and bugs on the master branch. branch-release-23.2 Used to mark GA and release blockers, technical advisories, and bugs for 23.2 branch-release-24.1 Used to mark GA and release blockers, technical advisories, and bugs for 24.1 branch-release-24.2 Used to mark GA and release blockers, technical advisories, and bugs for 24.2 branch-release-24.3 Used to mark GA and release blockers, technical advisories, and bugs for 24.3 C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-cdc

Comments

@andyyang890
Copy link
Collaborator

andyyang890 commented Dec 23, 2024

I came across these two pieces of code to generate a new checkpoint when we alter a changefeed that only assigns spans without a timestamp:

Checkpoint: &jobspb.ChangefeedProgress_Checkpoint{
Spans: existingTargetSpans,
},

Checkpoint: &jobspb.ChangefeedProgress_Checkpoint{
Spans: mergedSpanGroup.Slice(),
},

It seems to me that this checkpoint would not only not help restore progress of those spans, but actually regress the progress of those spans back to zero given we assume that the checkpoint is always greater than the highwater mark:

if checkpointSpanGroup.Encloses(nodeSpan) {
initialResolved = checkpoint.Timestamp
}

We should re-examine what the expected behavior should be and fix the code to reflect that.

Jira issue: CRDB-45815

@andyyang890 andyyang890 added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-cdc Change Data Capture T-cdc labels Dec 23, 2024
Copy link

blathers-crl bot commented Dec 23, 2024

Hi @andyyang890, please add branch-* labels to identify which branch(es) this C-bug affects.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

Copy link

blathers-crl bot commented Dec 23, 2024

cc @cockroachdb/cdc

@andyyang890 andyyang890 added branch-master Failures and bugs on the master branch. branch-release-24.1 Used to mark GA and release blockers, technical advisories, and bugs for 24.1 branch-release-23.2 Used to mark GA and release blockers, technical advisories, and bugs for 23.2 branch-release-24.2 Used to mark GA and release blockers, technical advisories, and bugs for 24.2 branch-release-24.3 Used to mark GA and release blockers, technical advisories, and bugs for 24.3 labels Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cdc Change Data Capture branch-master Failures and bugs on the master branch. branch-release-23.2 Used to mark GA and release blockers, technical advisories, and bugs for 23.2 branch-release-24.1 Used to mark GA and release blockers, technical advisories, and bugs for 24.1 branch-release-24.2 Used to mark GA and release blockers, technical advisories, and bugs for 24.2 branch-release-24.3 Used to mark GA and release blockers, technical advisories, and bugs for 24.3 C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-cdc
Projects
None yet
Development

No branches or pull requests

1 participant