@@ -353,7 +353,7 @@ func makeRebalanceReplicaChanges(
353
353
}
354
354
}
355
355
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 )
357
357
}
358
358
359
359
addState := ReplicaState {
@@ -1169,7 +1169,7 @@ func (cs *clusterState) processStoreLoadMsg(ctx context.Context, storeMsg *Store
1169
1169
// corresponding delta adjustment as the reported load already contains the
1170
1170
// effect.
1171
1171
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 )
1173
1173
delete (ss .adjusted .loadPendingChanges , change .ChangeID )
1174
1174
}
1175
1175
@@ -1179,7 +1179,7 @@ func (cs *clusterState) processStoreLoadMsg(ctx context.Context, storeMsg *Store
1179
1179
// replicas.
1180
1180
cs .applyChangeLoadDelta (change .ReplicaChange )
1181
1181
}
1182
- log .Dev .VInfof (ctx , 2 , "processStoreLoadMsg for store s%v: %v" ,
1182
+ log .KvDistribution .VInfof (ctx , 2 , "processStoreLoadMsg for store s%v: %v" ,
1183
1183
storeMsg .StoreID , ss .adjusted .load )
1184
1184
}
1185
1185
@@ -1279,7 +1279,7 @@ func (cs *clusterState) processStoreLeaseholderMsgInternal(
1279
1279
// rs.pendingChanges is the union of remainingChanges and enactedChanges.
1280
1280
// These changes are also in cs.pendingChanges.
1281
1281
if len (enactedChanges ) > 0 {
1282
- log .Dev .Infof (ctx , "enactedChanges %v" , enactedChanges )
1282
+ log .KvDistribution .Infof (ctx , "enactedChanges %v" , enactedChanges )
1283
1283
}
1284
1284
for _ , change := range enactedChanges {
1285
1285
// Mark the change as enacted. Enacting a change does not remove the
@@ -1301,7 +1301,7 @@ func (cs *clusterState) processStoreLeaseholderMsgInternal(
1301
1301
// effect is also incorporated into the storeStates, but not in the range
1302
1302
// membership (since we undid that above).
1303
1303
if len (remainingChanges ) > 0 {
1304
- log .Dev .Infof (ctx , "remainingChanges %v" , remainingChanges )
1304
+ log .KvDistribution .Infof (ctx , "remainingChanges %v" , remainingChanges )
1305
1305
// Temporarily set the rs.pendingChanges to nil, since
1306
1306
// preCheckOnApplyReplicaChanges returns false if there are any pending
1307
1307
// changes, and these are the changes that are pending. This is hacky
@@ -1324,7 +1324,7 @@ func (cs *clusterState) processStoreLeaseholderMsgInternal(
1324
1324
// changes, so we need to drop them. This should be rare, but can happen
1325
1325
// if the leaseholder executed a change that MMA was completely unaware
1326
1326
// 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" ,
1328
1328
remainingChanges , reason )
1329
1329
if metrics != nil {
1330
1330
metrics .DroppedDueToStateInconsistency .Inc (1 )
@@ -1556,7 +1556,7 @@ func (cs *clusterState) gcPendingChanges(now time.Time) {
1556
1556
}
1557
1557
if len (replicaChanges ) > 0 {
1558
1558
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 )
1560
1560
return
1561
1561
}
1562
1562
for _ , rmChange := range removeChangeIds {
@@ -1664,7 +1664,7 @@ func (cs *clusterState) createPendingChanges(changes ...ReplicaChange) []*pendin
1664
1664
cs .pendingChanges [cid ] = pendingChange
1665
1665
storeState .adjusted .loadPendingChanges [cid ] = pendingChange
1666
1666
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 )
1668
1668
pendingChanges = append (pendingChanges , pendingChange )
1669
1669
}
1670
1670
return pendingChanges
@@ -1691,7 +1691,7 @@ func (cs *clusterState) preCheckOnApplyReplicaChanges(
1691
1691
return false , "range does not exist in cluster state"
1692
1692
}
1693
1693
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" ,
1695
1695
rangeID , curr .pendingChanges )
1696
1696
return false , "range has pending changes"
1697
1697
}
@@ -1792,7 +1792,7 @@ func (cs *clusterState) applyReplicaChange(change ReplicaChange, applyLoadChange
1792
1792
panic (fmt .Sprintf ("range %v not found in cluster state" , change .rangeID ))
1793
1793
}
1794
1794
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" ,
1796
1796
change , change .rangeID , change .target .StoreID )
1797
1797
if change .isRemoval () {
1798
1798
delete (storeState .adjusted .replicas , change .rangeID )
@@ -1823,7 +1823,7 @@ func (cs *clusterState) applyReplicaChange(change ReplicaChange, applyLoadChange
1823
1823
}
1824
1824
1825
1825
func (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" ,
1827
1827
change , change .rangeID , change .target .StoreID )
1828
1828
rangeState := cs .ranges [change .rangeID ]
1829
1829
storeState := cs .stores [change .target .StoreID ]
@@ -1987,11 +1987,11 @@ func (cs *clusterState) canShedAndAddLoad(
1987
1987
var reason strings.Builder
1988
1988
defer func () {
1989
1989
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]" ,
1991
1991
targetNS .NodeID , targetSS .StoreID , canAddLoad , targetSLS , srcSLS )
1992
1992
} 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 )
1995
1995
}
1996
1996
}()
1997
1997
if targetSLS .highDiskSpaceUtilization {
@@ -2078,7 +2078,7 @@ func (cs *clusterState) canShedAndAddLoad(
2078
2078
}
2079
2079
// The use of 33% is arbitrary.
2080
2080
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 )
2082
2082
otherDimensionsBecameWorseInTarget = true
2083
2083
break
2084
2084
}
0 commit comments