-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds a new replica selector based on the Least Frequently Used (LFU) algorithm. `lfuReplicaSelector` selects each replica's storage node and data path, giving preference to those with fewer assigned replicas. All replica selectors, including `lfuReplicaSelector`, are stateless, meaning they don't keep existing log stream topology. When `Select` is invoked, `lfuReplicaSelector` collects used counters for each storage node and path. Although it seems to be inefficient, it is simple as well as fault-tolerant. To select the least used storage nodes and paths, `lfuReplicaSelector` runs as follows: - Fetch cluster metadata from the `ClusterMetadataView`. - Increase the used counters for each storage node and path assigned to each log stream. - Sort counters. - Choose the least used storage nodes and paths. Updates #393
- Loading branch information
Showing
4 changed files
with
402 additions
and
295 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
Oops, something went wrong.