fix flaws found in the process of ideal benchmark(#21504) (#21505)

1. enable paramter autoBalance
2. adjust inappropriate log info when searching in shardcluster

Signed-off-by: MrPresent-Han <jamesharden11122@gmail.com>
pull/21612/head
MrPresent-Han 2023-01-10 10:25:38 +08:00 committed by GitHub
parent 16798f4b2f
commit 27f7708d46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -42,6 +42,9 @@ func (b *BalanceChecker) Description() string {
func (b *BalanceChecker) Check(ctx context.Context) []task.Task {
ret := make([]task.Task, 0)
if !Params.QueryCoordCfg.AutoBalance {
return ret
}
segmentPlans, channelPlans := b.Balance.Balance()
tasks := balance.CreateSegmentTasksFromPlans(ctx, b.ID(), Params.QueryCoordCfg.SegmentTaskTimeout, segmentPlans)

View File

@ -833,9 +833,9 @@ func (sc *ShardCluster) GetStatistics(ctx context.Context, req *querypb.GetStati
segAllocs, versionID := sc.segmentAllocations(req.GetReq().GetPartitionIDs())
defer sc.finishUsage(versionID)
log.Info("cluster segment distribution", zap.Int("len", len(segAllocs)))
log.Debug("cluster segment distribution", zap.Int("len", len(segAllocs)))
for nodeID, segmentIDs := range segAllocs {
log.Info("segments distribution", zap.Int64("nodeID", nodeID), zap.Int64s("segments", segmentIDs))
log.Debug("segments distribution", zap.Int64("nodeID", nodeID), zap.Int64s("segments", segmentIDs))
}
// concurrent visiting nodes
@ -924,9 +924,9 @@ func (sc *ShardCluster) Search(ctx context.Context, req *querypb.SearchRequest,
segAllocs, versionID := sc.segmentAllocations(req.GetReq().GetPartitionIDs())
defer sc.finishUsage(versionID)
log.Info("cluster segment distribution", zap.Int("len", len(segAllocs)), zap.Int64s("partitionIDs", req.GetReq().GetPartitionIDs()))
log.Debug("cluster segment distribution", zap.Int("len", len(segAllocs)), zap.Int64s("partitionIDs", req.GetReq().GetPartitionIDs()))
for nodeID, segmentIDs := range segAllocs {
log.Info("segments distribution", zap.Int64("nodeID", nodeID), zap.Int64s("segments", segmentIDs))
log.Debug("segments distribution", zap.Int64("nodeID", nodeID), zap.Int64s("segments", segmentIDs))
}
// concurrent visiting nodes