Skip to content

row: Add a check for integrity of neededValueColsByIdx in row fetcher #40844

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

Merged
merged 1 commit into from
Sep 19, 2019

Conversation

rohany
Copy link
Contributor

@rohany rohany commented Sep 17, 2019

The panic #40410 arises when a value in neededValueColsByIdx is out of
bounds of the row buffer used in the fetcher. The length of the row
buffer is equal to the number of columns in the table, so this panic is
most likely caused by the neededValueColsByIdx containing an invalid
column ID. To guard against this / have more information about debugging
this in the future, we verify during fetcher setup that all the values
in neededValueColsByIdx are within range of the table's row buffer.

Fixes #40410.

Release justification: Low risk assertion of valid behavior.

Release note: None

The panic cockroachdb#40410 arises when a value in neededValueColsByIdx is out of
bounds of the row buffer used in the fetcher. The length of the row
buffer is equal to the number of columns in the table, so this panic is
most likely caused by the neededValueColsByIdx containing an invalid
column ID. To guard against this / have more information about debugging
this in the future, we verify during fetcher setup that all the values
in neededValueColsByIdx are within range of the table's row buffer.

Fixes cockroachdb#40410.

Release justification: Low risk assertion of valid behavior.

Release note: None
@rohany rohany requested review from jordanlewis and a team September 17, 2019 20:41
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@jordanlewis jordanlewis left a comment

Choose a reason for hiding this comment

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

:lgtm: thanks

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @jordanlewis)

@rohany
Copy link
Contributor Author

rohany commented Sep 19, 2019

bors r=jordanlewis

@craig
Copy link
Contributor

craig bot commented Sep 19, 2019

Build failed

@rohany
Copy link
Contributor Author

rohany commented Sep 19, 2019

bors r=jordanlewis

craig bot pushed a commit that referenced this pull request Sep 19, 2019
40844: row: Add a check for integrity of neededValueColsByIdx in row fetcher r=jordanlewis a=rohany

The panic #40410 arises when a value in neededValueColsByIdx is out of
bounds of the row buffer used in the fetcher. The length of the row
buffer is equal to the number of columns in the table, so this panic is
most likely caused by the neededValueColsByIdx containing an invalid
column ID. To guard against this / have more information about debugging
this in the future, we verify during fetcher setup that all the values
in neededValueColsByIdx are within range of the table's row buffer.

Fixes #40410.

Release justification: Low risk assertion of valid behavior.

Release note: None

Co-authored-by: Rohan Yadav <[email protected]>
@craig
Copy link
Contributor

craig bot commented Sep 19, 2019

Build succeeded

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.

sql: panic in row fetcher during UPSERT
3 participants