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

raft: respect leader fortification in MsgForgetLeader #129000

Merged

Conversation

nvanbenschoten
Copy link
Member

Fixes #124496.

This commit makes peers consult leader fortification state when processing a MsgForgetLeader message. If the leader is fortified and currently supported, the peer will ignore the message.

Epic: None
Release note: None

Logs typically don't have punctuation.

Epic: None
Release note: None
Makes the no-op case more observable.

Epic: None
Release note: None
Fixes cockroachdb#124496.

This commit makes peers consult leader fortification state when
processing a MsgForgetLeader message. If the leader is fortified and
currently supported, the peer will ignore the message.

Epic: None
Release note: None
@nvanbenschoten nvanbenschoten requested a review from a team as a code owner August 14, 2024 19:20
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@arulajmani arulajmani left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r1, 2 of 2 files at r2, 3 of 3 files at r3, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @nvanbenschoten)


pkg/raft/raft.go line 1000 at r3 (raw file):

	// TODO(arul): we will eventually want some kind of logic like this.
	//
	//if r.supportingFortifiedLeader() && t != campaignTransfer {

This is exactly the thing I was just messaging you about!

@nvanbenschoten
Copy link
Member Author

TFTR!

bors r+

@craig craig bot merged commit 9421149 into cockroachdb:master Aug 14, 2024
23 checks passed
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.

kv: forgetting leader should respect fortification
3 participants