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: consider VOTER_INCOMING for lease transfer even if current … #76974

Merged
merged 1 commit into from
Feb 25, 2022

Conversation

shralex
Copy link
Contributor

@shralex shralex commented Feb 24, 2022

…leaseholder isn't the Raft leader

This was previously done as part of #74077
but a check for leader-leaseholder collocation was missed by that patch. This check is removed
in this PR, as this case is already covered by replicaMayNeedSnapshot.

With this PR, restoreTPCCInc/nodes=10 passed 85 times in a row.

In future PRs, we will make the error returned by maybeTransferLeaseDuringLeaveJoint retriable by
AdminSplit.

Release note: None

@shralex shralex requested a review from tbg February 24, 2022 09:32
@shralex shralex requested a review from a team as a code owner February 24, 2022 09:32
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
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:

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


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

// excludeReplicasInNeedOfSnapshots filters out the `replicas` that may be in
// need of a raft snapshot. If this function is called with the `raftStatus` of
// a non-raft leader replica, an empty slice is returned.

Let's also update this comment with the caveat that VOTER_INCOMINGs are always included in the result. Likewise for the comment above replicaMayNeedSnapshot.

…leaseholder isn't the Raft leader

This was previously done as part of cockroachdb#74077
but a check for leader-leaseholder collocation was missed by that patch. This check is removed
in this PR, as this case is already covered by replicaMayNeedSnapshot.

In future PRs, we will make the error returned by maybeTransferLeaseDuringLeaveJoint retriable by
AdminSplit.

Release note: None
@shralex shralex force-pushed the update_expected_relocate_errors2 branch from 96535cf to cd98815 Compare February 24, 2022 18:39
@shralex
Copy link
Contributor Author

shralex commented Feb 24, 2022

bors r+

@craig
Copy link
Contributor

craig bot commented Feb 25, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Feb 25, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Feb 25, 2022

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.

3 participants