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

sql: fix iteration conditions in crdb_internal.scan #98329

Merged
merged 1 commit into from
Mar 9, 2023

Conversation

stevendanna
Copy link
Collaborator

Rather than using the Next() key of the last key in the response when iterating, we should use the resume span. The previous code could result in a failure in the rare case that the end key of our scan exactly matched the successor key of the very last key in the iteration.

Epic: none

Release note: None

@stevendanna stevendanna requested a review from a team March 9, 2023 19:49
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Rather than using the Next() key of the last key in the response when
iterating, we should use the resume span. The previous code could
result in a failure in the rare case that the end key of our scan
exactly matched the successor key of the very last key in the
iteration.

Release note: None
Copy link
Contributor

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @stevendanna)

@stevendanna
Copy link
Collaborator Author

bors r=ajwerner

@craig
Copy link
Contributor

craig bot commented Mar 9, 2023

Build succeeded:

@craig craig bot merged commit 62eb4b8 into cockroachdb:master Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants