@@ -353,7 +353,7 @@ func makeRebalanceReplicaChanges(
353353 }
354354 }
355355 if remove == (StoreIDAndReplicaState {}) {
356- log .Dev .Fatalf (context .Background (), "remove target %s not in existing replicas" , removeTarget )
356+ log .KvDistribution .Fatalf (context .Background (), "remove target %s not in existing replicas" , removeTarget )
357357 }
358358
359359 addState := ReplicaState {
@@ -1169,7 +1169,7 @@ func (cs *clusterState) processStoreLoadMsg(ctx context.Context, storeMsg *Store
11691169 // corresponding delta adjustment as the reported load already contains the
11701170 // effect.
11711171 for _ , change := range ss .computePendingChangesReflectedInLatestLoad (storeMsg .LoadTime ) {
1172- log .Dev .VInfof (ctx , 2 , "s%d not-pending %v" , storeMsg .StoreID , change )
1172+ log .KvDistribution .VInfof (ctx , 2 , "s%d not-pending %v" , storeMsg .StoreID , change )
11731173 delete (ss .adjusted .loadPendingChanges , change .ChangeID )
11741174 }
11751175
@@ -1179,7 +1179,7 @@ func (cs *clusterState) processStoreLoadMsg(ctx context.Context, storeMsg *Store
11791179 // replicas.
11801180 cs .applyChangeLoadDelta (change .ReplicaChange )
11811181 }
1182- log .Dev .VInfof (ctx , 2 , "processStoreLoadMsg for store s%v: %v" ,
1182+ log .KvDistribution .VInfof (ctx , 2 , "processStoreLoadMsg for store s%v: %v" ,
11831183 storeMsg .StoreID , ss .adjusted .load )
11841184}
11851185
@@ -1279,7 +1279,7 @@ func (cs *clusterState) processStoreLeaseholderMsgInternal(
12791279 // rs.pendingChanges is the union of remainingChanges and enactedChanges.
12801280 // These changes are also in cs.pendingChanges.
12811281 if len (enactedChanges ) > 0 {
1282- log .Dev .Infof (ctx , "enactedChanges %v" , enactedChanges )
1282+ log .KvDistribution .Infof (ctx , "enactedChanges %v" , enactedChanges )
12831283 }
12841284 for _ , change := range enactedChanges {
12851285 // Mark the change as enacted. Enacting a change does not remove the
@@ -1301,7 +1301,7 @@ func (cs *clusterState) processStoreLeaseholderMsgInternal(
13011301 // effect is also incorporated into the storeStates, but not in the range
13021302 // membership (since we undid that above).
13031303 if len (remainingChanges ) > 0 {
1304- log .Dev .Infof (ctx , "remainingChanges %v" , remainingChanges )
1304+ log .KvDistribution .Infof (ctx , "remainingChanges %v" , remainingChanges )
13051305 // Temporarily set the rs.pendingChanges to nil, since
13061306 // preCheckOnApplyReplicaChanges returns false if there are any pending
13071307 // changes, and these are the changes that are pending. This is hacky
@@ -1324,7 +1324,7 @@ func (cs *clusterState) processStoreLeaseholderMsgInternal(
13241324 // changes, so we need to drop them. This should be rare, but can happen
13251325 // if the leaseholder executed a change that MMA was completely unaware
13261326 // of.
1327- log .Dev .Infof (ctx , "remainingChanges %v are no longer valid due to %v" ,
1327+ log .KvDistribution .Infof (ctx , "remainingChanges %v are no longer valid due to %v" ,
13281328 remainingChanges , reason )
13291329 if metrics != nil {
13301330 metrics .DroppedDueToStateInconsistency .Inc (1 )
@@ -1556,7 +1556,7 @@ func (cs *clusterState) gcPendingChanges(now time.Time) {
15561556 }
15571557 if len (replicaChanges ) > 0 {
15581558 if valid , reason := cs .preCheckOnUndoReplicaChanges (replicaChanges ); ! valid {
1559- log .Dev .Infof (context .Background (), "did not undo change %v: due to %v" , removeChangeIds , reason )
1559+ log .KvDistribution .Infof (context .Background (), "did not undo change %v: due to %v" , removeChangeIds , reason )
15601560 return
15611561 }
15621562 for _ , rmChange := range removeChangeIds {
@@ -1664,7 +1664,7 @@ func (cs *clusterState) createPendingChanges(changes ...ReplicaChange) []*pendin
16641664 cs .pendingChanges [cid ] = pendingChange
16651665 storeState .adjusted .loadPendingChanges [cid ] = pendingChange
16661666 rangeState .pendingChanges = append (rangeState .pendingChanges , pendingChange )
1667- log .Dev .VInfof (context .Background (), 3 , "createPendingChanges: change_id=%v, range_id=%v, change=%v" , cid , change .rangeID , change )
1667+ log .KvDistribution .VInfof (context .Background (), 3 , "createPendingChanges: change_id=%v, range_id=%v, change=%v" , cid , change .rangeID , change )
16681668 pendingChanges = append (pendingChanges , pendingChange )
16691669 }
16701670 return pendingChanges
@@ -1691,7 +1691,7 @@ func (cs *clusterState) preCheckOnApplyReplicaChanges(
16911691 return false , "range does not exist in cluster state"
16921692 }
16931693 if len (curr .pendingChanges ) > 0 {
1694- log .Dev .VInfof (context .Background (), 2 , "range %d has pending changes: %v" ,
1694+ log .KvDistribution .VInfof (context .Background (), 2 , "range %d has pending changes: %v" ,
16951695 rangeID , curr .pendingChanges )
16961696 return false , "range has pending changes"
16971697 }
@@ -1792,7 +1792,7 @@ func (cs *clusterState) applyReplicaChange(change ReplicaChange, applyLoadChange
17921792 panic (fmt .Sprintf ("range %v not found in cluster state" , change .rangeID ))
17931793 }
17941794
1795- log .Dev .VInfof (context .Background (), 2 , "applying replica change %v to range %d on store %d" ,
1795+ log .KvDistribution .VInfof (context .Background (), 2 , "applying replica change %v to range %d on store %d" ,
17961796 change , change .rangeID , change .target .StoreID )
17971797 if change .isRemoval () {
17981798 delete (storeState .adjusted .replicas , change .rangeID )
@@ -1823,7 +1823,7 @@ func (cs *clusterState) applyReplicaChange(change ReplicaChange, applyLoadChange
18231823}
18241824
18251825func (cs * clusterState ) undoReplicaChange (change ReplicaChange ) {
1826- log .Dev .Infof (context .Background (), "undoing replica change %v to range %d on store %d" ,
1826+ log .KvDistribution .Infof (context .Background (), "undoing replica change %v to range %d on store %d" ,
18271827 change , change .rangeID , change .target .StoreID )
18281828 rangeState := cs .ranges [change .rangeID ]
18291829 storeState := cs .stores [change .target .StoreID ]
@@ -1987,11 +1987,11 @@ func (cs *clusterState) canShedAndAddLoad(
19871987 var reason strings.Builder
19881988 defer func () {
19891989 if canAddLoad {
1990- log .Dev .VInfof (ctx , 3 , "can add load to n%vs%v: %v targetSLS[%v] srcSLS[%v]" ,
1990+ log .KvDistribution .VInfof (ctx , 3 , "can add load to n%vs%v: %v targetSLS[%v] srcSLS[%v]" ,
19911991 targetNS .NodeID , targetSS .StoreID , canAddLoad , targetSLS , srcSLS )
19921992 } else {
1993- log .Dev .VInfof (ctx , 2 , "cannot add load to n%vs%v: due to %s" , targetNS .NodeID , targetSS .StoreID , reason .String ())
1994- log .Dev .VInfof (ctx , 2 , "[target_sls:%v,src_sls:%v]" , targetSLS , srcSLS )
1993+ log .KvDistribution .VInfof (ctx , 2 , "cannot add load to n%vs%v: due to %s" , targetNS .NodeID , targetSS .StoreID , reason .String ())
1994+ log .KvDistribution .VInfof (ctx , 2 , "[target_sls:%v,src_sls:%v]" , targetSLS , srcSLS )
19951995 }
19961996 }()
19971997 if targetSLS .highDiskSpaceUtilization {
@@ -2078,7 +2078,7 @@ func (cs *clusterState) canShedAndAddLoad(
20782078 }
20792079 // The use of 33% is arbitrary.
20802080 if dimFractionIncrease > overloadedDimFractionIncrease / 3 {
2081- log .Dev .Infof (ctx , "%v: %f > %f/3" , dim , dimFractionIncrease , overloadedDimFractionIncrease )
2081+ log .KvDistribution .Infof (ctx , "%v: %f > %f/3" , dim , dimFractionIncrease , overloadedDimFractionIncrease )
20822082 otherDimensionsBecameWorseInTarget = true
20832083 break
20842084 }
0 commit comments