-
Notifications
You must be signed in to change notification settings - Fork 4.1k
raft: use term cache for leader commit term check #143362
Copy link
Copy link
Closed
Labels
A-kv-replicationRelating to Raft, consensus, and coordination.Relating to Raft, consensus, and coordination.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)v25.2.0-prerelease
Description
Previously, we avoided calling term(index) for leader commit term check by keeping the first entry index for the current leader term in memory, and comparing against that index. (see #137826)
Now, since we have implemented term cache (which keeps track of a suffix of raft log entryIDs, and allow us to get the term of an entry by index), lets use the term cache for that check to reduce the complexity of our code. (see #142239 )
Jira issue: CRDB-48779
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-kv-replicationRelating to Raft, consensus, and coordination.Relating to Raft, consensus, and coordination.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)v25.2.0-prerelease