Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pkg/kv/kvserver/allocator/mmaprototype/allocator_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,14 @@ func sortTargetCandidateSetAndPick(
return cands.candidates[j].StoreID
}

// ensureAnalyzedConstraints populates the constraints for the given range.
// It should be called when computing lease-transfers / rebalancing candidates
// for a range.
//
// NB: given rstate.conf should already be normalized using
// makeNormalizedSpanConfig. The caller is responsible for calling
// clearAnalyzedConstraints when rstate or the rstate.constraints is no longer
// needed.
func (cs *clusterState) ensureAnalyzedConstraints(rstate *rangeState) {
if rstate.constraints != nil {
return
Expand Down
Loading