-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvflow{handle,tokentracker,simulator}: implement kvflowcontrol.Handle
Part of #95563. kvflowcontrol.Handle is used to interface with replication flow control; it's typically backed by a node-level kvflowcontrol.Controller. Handles are held on replicas initiating replication traffic, i.e. are both the leaseholder and raft leader, and manage multiple streams underneath (typically one per active member of the raft group). When replicating log entries, these replicas choose the log position (term+index) the data is to end up at, and use this handle to track the token deductions on a per log position basis. When informed of admitted log entries on the receiving end of the stream, we free up tokens by specifying the highest log position up to which we've admitted (below-raft admission, for a given priority, takes log position into account -- see kvflowcontrolpb.AdmittedRaftLogEntries for more details). We also extend the testing framework introduced in #95905 to also support writing tests for kvflowcontrol.Handle -- it's now pulled into its own kvflowsimulator package. Release note: None
- Loading branch information
1 parent
9ea0ef2
commit 93aa058
Showing
26 changed files
with
2,769 additions
and
618 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.