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

kv: forgetting leader should respect fortification #124496

Closed
nvanbenschoten opened this issue May 21, 2024 · 1 comment · Fixed by #129000
Closed

kv: forgetting leader should respect fortification #124496

nvanbenschoten opened this issue May 21, 2024 · 1 comment · Fixed by #129000
Assignees
Labels
A-kv-replication Relating to Raft, consensus, and coordination. A-leader-leases Related to the introduction of leader leases C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. T-kv KV Team

Comments

@nvanbenschoten
Copy link
Member

nvanbenschoten commented May 21, 2024

maybeForgetLeaderOnVoteRequestLocked is called when receiving a (Pre)Vote request. If the current leader is not live (according to liveness) or not in our range descriptor, we forget it and become a leaderless follower.

This method was added in #105132. As the TODO in its comment describes, the mechanism is only relevant with epoch leases and 23.1 compatibility. It can and should be removed when we address #123847.

Jira issue: CRDB-38929

Epic CRDB-37522

@nvanbenschoten nvanbenschoten added C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. A-kv-replication Relating to Raft, consensus, and coordination. T-kv KV Team labels May 21, 2024
@nvanbenschoten nvanbenschoten self-assigned this May 21, 2024
Copy link

blathers-crl bot commented May 21, 2024

cc @cockroachdb/replication

@nvanbenschoten nvanbenschoten added the A-leader-leases Related to the introduction of leader leases label Jun 6, 2024
@nvanbenschoten nvanbenschoten changed the title kv: remove Replica.maybeForgetLeaderOnVoteRequestLocked kv: forgetting leader should respect fortification Aug 14, 2024
craig bot pushed a commit that referenced this issue Aug 14, 2024
129000: raft: respect leader fortification in MsgForgetLeader r=nvanbenschoten a=nvanbenschoten

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

Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
@craig craig bot closed this as completed in 74cc8e2 Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-kv-replication Relating to Raft, consensus, and coordination. A-leader-leases Related to the introduction of leader leases C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. T-kv KV Team
Projects
No open projects
Status: Incoming
Development

Successfully merging a pull request may close this issue.

1 participant