Skip to content

kvserver: remove same node check from TransferLeaseTarget#63489

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
lunevalex:alex/fix-lease-transfer-same-node
Apr 14, 2021
Merged

kvserver: remove same node check from TransferLeaseTarget#63489
craig[bot] merged 1 commit intocockroachdb:masterfrom
lunevalex:alex/fix-lease-transfer-same-node

Conversation

@lunevalex
Copy link
Copy Markdown

@lunevalex lunevalex commented Apr 12, 2021

In #51567 we added the ability to rebalance replicas between
stores on the same node. This PR reverts the changes
introduced in #12565, since we no longer need to special case
multiple stores per node.

Release note: None

@lunevalex lunevalex requested review from aayushshah15 and nvb April 12, 2021 20:05
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@lunevalex lunevalex force-pushed the alex/fix-lease-transfer-same-node branch from 04e5699 to 12eb87c Compare April 12, 2021 20:06
Copy link
Copy Markdown
Contributor

@aayushshah15 aayushshah15 left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @lunevalex and @nvanbenschoten)


pkg/kv/kvserver/allocator.go, line 1248 at r1 (raw file):

) roachpb.ReplicaDescriptor {
	sl, _, _ := a.storePool.getStoreList(storeFilterNone)
	sl = sl.filter(zone.VoterConstraints)

We'd want to filter by both the Constraints and VoterConstraints since are allowed to be different (and voters have to conform to both).


pkg/kv/kvserver/allocator.go, line 1389 at r1 (raw file):

	sl, _, _ := a.storePool.getStoreList(storeFilterNone)
	sl = sl.filter(zone.Constraints)

We should filter by VoterConstraints here as well. BTW, how do you feel about lifting these VoterConstraints changes into their own commit?

@lunevalex
Copy link
Copy Markdown
Author


pkg/kv/kvserver/allocator.go, line 1389 at r1 (raw file):

Previously, aayushshah15 (Aayush Shah) wrote…

We should filter by VoterConstraints here as well. BTW, how do you feel about lifting these VoterConstraints changes into their own commit?

yeah thats a good idea, I will do a separate change for that

In cockroachdb#51567 we added the ability to rebalance replicas between
stores on the same node. This PR reverts the changes
introduced in cockroachdb#12565, since we no longer need to special case
multiple stores per node.

Release note: None
@lunevalex lunevalex force-pushed the alex/fix-lease-transfer-same-node branch from 12eb87c to 65e00f0 Compare April 12, 2021 22:06
Copy link
Copy Markdown
Contributor

@aayushshah15 aayushshah15 left a comment

Choose a reason for hiding this comment

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

:lgtm: though I think Nathan should probably sign off as well.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @aayushshah15, @lunevalex, and @nvanbenschoten)

Copy link
Copy Markdown
Contributor

@nvb nvb left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! 2 of 0 LGTMs obtained (waiting on @aayushshah15 and @lunevalex)

@lunevalex
Copy link
Copy Markdown
Author

TFTR!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Apr 14, 2021

Build succeeded:

@craig craig bot merged commit 016457b into cockroachdb:master Apr 14, 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.

4 participants