-
Notifications
You must be signed in to change notification settings - Fork 4k
release-25.2: execbuilder: fix a silly bug around finding the most recent full stat #148394
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
release-25.2: execbuilder: fix a silly bug around finding the most recent full stat #148394
Conversation
This commit fixes a bug that was added in 3bc0992. In short, in a complicated logical expression we had `v1 && v2 || v3` when we wanted `v1 && (v2 || v3)`. This allowed us to hit an index of bounds when evaluating `v3`, which in this concrete case could mean that we iterated over all stats and didn't find any full ones. There are two other places with similar conditionals, and they have the correct usage of parenthesis, so I didn't change the structure overall. I did find that we want to also skip the merged stat, depending on the session variable. Also the bug seems quite difficult to hit, so I omitted the release note. Release note: None
|
Thanks for opening a backport. Please check the backport criteria before merging:
If your backport adds new functionality, please ensure that the following additional criteria are satisfied:
Also, please add a brief release justification to the body of your PR to justify this |
mgartner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @michae2)
michae2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status:complete! 2 of 0 LGTMs obtained (waiting on @yuzefovich)
|
TFTRs! |
Backport 1/1 commits from #148329 on behalf of @yuzefovich.
This commit fixes a bug that was added in 3bc0992. In short, in a complicated logical expression we had
v1 && v2 || v3when we wantedv1 && (v2 || v3). This allowed us to hit an index of bounds when evaluatingv3, which in this concrete case could mean that we iterated over all stats and didn't find any full ones.There are two other places with similar conditionals, and they have the correct usage of parenthesis, so I didn't change the structure overall. I did find that we want to also skip the merged stat, depending on the session variable.
Also the bug seems quite difficult to hit, so I omitted the release note.
Fixes: #148316.
Release note: None
Release justification: critical bug fix: we've seen this bug result in a failure to take a backup (#148316) since it can error out an internal query used by the backup (another example is #148414 with
read-role-with-membershipsinternal query). In the extreme, failure to backup data can result in a data loss.