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: changefeeds with cdc queries fail when the query results in a single key scan #143101

Closed
asg0451 opened this issue Mar 18, 2025 · 1 comment · Fixed by #143102
Closed
Labels
A-cdc Change Data Capture branch-master Failures and bugs on the master branch. 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. O-support Would prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs T-cdc target-release-25.2.0

Comments

@asg0451
Copy link
Contributor

asg0451 commented Mar 18, 2025

repro:

CREATE TABLE orders3 (
  order_id INT PRIMARY KEY
);
CREATE CHANGEFEED AS SELECT * FROM orders3 WHERE order_id = 1;

in the logs: changefeed retrying due to transient error: inverted span ‹/Table/106/1/1/0›: interval: inverted range

Jira issue: CRDB-48654

@asg0451 asg0451 added A-cdc Change Data Capture branch-master Failures and bugs on the master branch. 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. O-support Would prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs T-cdc labels Mar 18, 2025
Copy link

blathers-crl bot commented Mar 18, 2025

cc @cockroachdb/cdc

asg0451 added a commit to asg0451/cockroach that referenced this issue Mar 18, 2025
When a cdc query results in a plan that scans a
single key, the end key of the span is unset. This
causes the feed to fail on startup. We now set
span.EndKey = span.Key.Next().

Fixes: cockroachdb#143101

Release note (bug fix): Fixed a bug that caused feeds to fail on startup when
scanning a single key.
asg0451 added a commit to asg0451/cockroach that referenced this issue Mar 18, 2025
When a cdc query results in a plan that scans a
single key, the end key of the span is unset. This
causes the feed to fail on startup. We now set
span.EndKey = span.Key.Next().

Fixes: cockroachdb#143101

Release note (bug fix): Fixed a bug that caused feeds to fail on startup when
scanning a single key.
asg0451 added a commit to asg0451/cockroach that referenced this issue Mar 19, 2025
When a cdc query results in a plan that scans a
single key, the end key of the span is unset. This
causes the feed to fail on startup. We now set
span.EndKey = span.Key.Next().

Fixes: cockroachdb#143101

Release note (bug fix): Fixed a bug that caused feeds to fail on startup when
scanning a single key.
asg0451 added a commit to asg0451/cockroach that referenced this issue Mar 19, 2025
When a cdc query results in a plan that scans a
single key, the end key of the span is unset. This
causes the feed to fail on startup. We now set
span.EndKey = span.Key.Next().

Fixes: cockroachdb#143101

Release note (bug fix): Fixed a bug that caused feeds to fail on startup when
scanning a single key.
asg0451 added a commit to asg0451/cockroach that referenced this issue Mar 19, 2025
When a cdc query results in a plan that scans a
single key, the end key of the span is unset. This
causes the feed to fail on startup. We now set
span.EndKey = span.Key.Next().

Fixes: cockroachdb#143101

Release note (bug fix): Fixed a bug that caused feeds to fail on startup when
scanning a single key.
craig bot pushed a commit that referenced this issue Mar 19, 2025
143102: changefeedccl: ensure that spans planned from cdc queries have end keys r=rharding6373,andyyang890 a=asg0451

When a cdc query results in a plan that scans a
single key, the end key of the span is unset. This
causes the feed to fail on startup. We now set
span.EndKey = span.Key.Next().

Fixes: #143101

Release note (bug fix): Fixed a bug that caused feeds to fail on startup when
scanning a single key.


Co-authored-by: Miles Frankel <[email protected]>
asg0451 added a commit to asg0451/cockroach that referenced this issue Mar 19, 2025
When a cdc query results in a plan that scans a
single key, the end key of the span is unset. This
causes the feed to fail on startup. We now set
span.EndKey = span.Key.Next().

Fixes: cockroachdb#143101

Release note (bug fix): Fixed a bug that caused feeds to fail on startup when
scanning a single key.
craig bot pushed a commit that referenced this issue Mar 19, 2025
143102: changefeedccl: ensure that spans planned from cdc queries have end keys r=rharding6373,andyyang890 a=asg0451

When a cdc query results in a plan that scans a
single key, the end key of the span is unset. This
causes the feed to fail on startup. We now set
span.EndKey = span.Key.Next().

Fixes: #143101

Release note (bug fix): Fixed a bug that caused feeds to fail on startup when
scanning a single key.


Co-authored-by: Miles Frankel <[email protected]>
craig bot pushed a commit that referenced this issue Mar 19, 2025
143102: changefeedccl: ensure that spans planned from cdc queries have end keys r=rharding6373,andyyang890 a=asg0451

When a cdc query results in a plan that scans a
single key, the end key of the span is unset. This
causes the feed to fail on startup. We now set
span.EndKey = span.Key.Next().

Fixes: #143101

Release note (bug fix): Fixed a bug that caused feeds to fail on startup when
scanning a single key.


Co-authored-by: Miles Frankel <[email protected]>
@craig craig bot closed this as completed in adb564a Mar 19, 2025
asg0451 added a commit to asg0451/cockroach that referenced this issue Mar 19, 2025
When a cdc query results in a plan that scans a
single key, the end key of the span is unset. This
causes the feed to fail on startup. We now set
span.EndKey = span.Key.Next().

Fixes: cockroachdb#143101

Release note (bug fix): Fixed a bug that caused feeds to fail on startup when
scanning a single key.
asg0451 added a commit to asg0451/cockroach that referenced this issue Mar 19, 2025
When a cdc query results in a plan that scans a
single key, the end key of the span is unset. This
causes the feed to fail on startup. We now set
span.EndKey = span.Key.Next().

Fixes: cockroachdb#143101

Release note (bug fix): Fixed a bug that caused feeds to fail on startup when
scanning a single key.
asg0451 added a commit to asg0451/cockroach that referenced this issue Mar 19, 2025
When a cdc query results in a plan that scans a
single key, the end key of the span is unset. This
causes the feed to fail on startup. We now set
span.EndKey = span.Key.Next().

Fixes: cockroachdb#143101

Release note (bug fix): Fixed a bug that caused feeds to fail on startup when
scanning a single key.
asg0451 added a commit to asg0451/cockroach that referenced this issue Mar 19, 2025
When a cdc query results in a plan that scans a
single key, the end key of the span is unset. This
causes the feed to fail on startup. We now set
span.EndKey = span.Key.Next().

Fixes: cockroachdb#143101

Release note (bug fix): Fixed a bug that caused feeds to fail on startup when
scanning a single key.
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-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. O-support Would prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs T-cdc target-release-25.2.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant