Skip to content

Commit

Permalink
refine comment
Browse files Browse the repository at this point in the history
Signed-off-by: crazycs520 <[email protected]>
  • Loading branch information
crazycs520 committed Mar 6, 2024
1 parent 6f55235 commit b7f9933
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/locate/region_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,7 @@ func (s *baseReplicaSelector) onNotLeader(

// updateLeader updates the leader of the cached region.
// If the leader peer isn't found in the region, the region will be invalidated.
// If switch to new leader successfully, returns the AccessIndex of the new leader in the replicas.
func (s *baseReplicaSelector) updateLeader(leader *metapb.Peer) int {
if leader == nil {
return -1
Expand Down
2 changes: 1 addition & 1 deletion internal/locate/replica_selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ func (s *ReplicaSelectMixedStrategy) isCandidate(r *replica, isLeader bool, epoc
}

const (
// the definition of the score is:
// The definition of the score is:
// MSB LSB
// [unused bits][1 bit: LabelMatches][1 bit: PreferLeader][2 bits: NormalPeer + NotSlow]
flagLabelMatches = 1 << 3
Expand Down

0 comments on commit b7f9933

Please sign in to comment.