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

kvserver: re-add spuriously removed nil check in relocateOne #61094

Merged

Conversation

aayushshah15
Copy link
Contributor

@aayushshah15 aayushshah15 commented Feb 24, 2021

bce8317 introduced a bug by spuriously
removing a nil check over the result of a call to
allocateTargetFromList. This commit re-adds the check.

The bug could cause a panic when AdminRelocateRange was called by the
StoreRebalancer or the mergeQueue if one (or more) of the stores
that are supposed to receive a replica for a range become unfit for
receiving the replica (due to balancing reasons / or shifting
constraints) between when rebalancing decision is made and when it's
executed
.

Resolves #60812

Release justification: fixes bug that causes a panic
Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@nvanbenschoten nvanbenschoten left a comment

Choose a reason for hiding this comment

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

:lgtm: nice find!

Not that it matters, but I think this was actually removed in bce8317.

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

e924d91 introduced a bug by spuriously
removing a nil check over the result of a call to
`allocateTargetFromList`. This commit re-adds the check.

The bug could cause a panic when `AdminRelocateRange` was called by the
`StoreRebalancer` or the `mergeQueue` if one (or more) of the stores
that are supposed to receive a replica for a range become unfit for
receiving the replica (due to balancing reasons / or shifting
constraints) _between when rebalancing decision is made and when it's
executed_.

Resolves cockroachdb#60812

Release justification: fixes bug that causes a panic
Release note: None
@aayushshah15
Copy link
Contributor Author

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Feb 25, 2021

Build succeeded:

@craig craig bot merged commit 4d24f8a into cockroachdb:master Feb 25, 2021
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.

roachtest: tpccbench/nodes=9/cpu=4/chaos/partition failed [fix pending]
3 participants