-
Notifications
You must be signed in to change notification settings - Fork 118
Description
Is your feature request related to a problem? Please describe.
Current ReplicaSelector interface pass Metapb.Peer to implementation which contains limited information for users to pick the peers to use. We want to select peers with rich meta data, for example the label of a peer, version of the instance or maybe the listening address however.
Describe the solution you'd like
Change ReplicaSelector to accept some types that provides rich meta data that users would like to use.
Describe alternatives you've considered
Let users get whatever meta data by themself with peer id which is available with current interface.
Additional context
We are implementing follower read to read followers from peers with certain label set. With placement rules, we can have some servers that run followers only therefore are safe to read from them without jeopardising online transactions.