mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-29 18:38:44 +08:00
enhance: Add channel name to shard leader log in meta cache (#37856)
Signed-off-by: Wei Liu <wei.liu@zilliz.com>
This commit is contained in:
parent
97a44b62fd
commit
965bda6e60
@ -981,9 +981,9 @@ func (m *MetaCache) GetShards(ctx context.Context, withCache bool, database, col
|
||||
ret := iterator.Shuffle()
|
||||
m.leaderMut.Unlock()
|
||||
nodeInfos := make([]string, 0)
|
||||
for _, shardLeader := range newShardLeaders.shardLeaders {
|
||||
for ch, shardLeader := range newShardLeaders.shardLeaders {
|
||||
for _, nodeInfo := range shardLeader {
|
||||
nodeInfos = append(nodeInfos, fmt.Sprintf("nodeID: %d, nodeAddr: %s", nodeInfo.nodeID, nodeInfo.address))
|
||||
nodeInfos = append(nodeInfos, fmt.Sprintf("channel %s, nodeID: %d, nodeAddr: %s", ch, nodeInfo.nodeID, nodeInfo.address))
|
||||
}
|
||||
}
|
||||
log.Debug("fill new collection shard leader", zap.Strings("nodeInfos", nodeInfos))
|
||||
|
@ -73,7 +73,6 @@ func (b *ScoreBasedBalancer) assignSegment(br *balanceReport, collectionID int64
|
||||
if len(nodeItemsMap) == 0 {
|
||||
return nil
|
||||
}
|
||||
log.Info("node workload status", zap.Int64("collectionID", collectionID), zap.Stringers("nodes", lo.Values(nodeItemsMap)))
|
||||
|
||||
queue := newPriorityQueue()
|
||||
for _, item := range nodeItemsMap {
|
||||
@ -351,6 +350,11 @@ func (b *ScoreBasedBalancer) genSegmentPlan(br *balanceReport, replica *meta.Rep
|
||||
return nil
|
||||
}
|
||||
|
||||
log.Info("node workload status",
|
||||
zap.Int64("collectionID", replica.GetCollectionID()),
|
||||
zap.Int64("replicaID", replica.GetID()),
|
||||
zap.Stringers("nodes", lo.Values(nodeItemsMap)))
|
||||
|
||||
// list all segment which could be balanced, and calculate node's score
|
||||
for _, node := range onlineNodes {
|
||||
dist := b.dist.SegmentDistManager.GetByFilter(meta.WithCollectionID(replica.GetCollectionID()), meta.WithNodeID(node))
|
||||
|
Loading…
Reference in New Issue
Block a user