From 1e580ae8f01478d9076ef7c5e259350323788e4f Mon Sep 17 00:00:00 2001 From: bigsheeper Date: Mon, 4 Nov 2024 20:11:08 +0800 Subject: [PATCH] test: Test ci Signed-off-by: bigsheeper --- .../querycoordv2/observers/collection_observer.go | 2 +- internal/querycoordv2/observers/target_observer.go | 14 +++++++------- internal/querynodev2/services.go | 8 +++++--- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/internal/querycoordv2/observers/collection_observer.go b/internal/querycoordv2/observers/collection_observer.go index 843e3a4d55065..8357bae8d7fcf 100644 --- a/internal/querycoordv2/observers/collection_observer.go +++ b/internal/querycoordv2/observers/collection_observer.go @@ -308,7 +308,7 @@ func (ob *CollectionObserver) observePartitionLoadStatus(ctx context.Context, pa return } - log.RatedInfo(10, "partition targets", + log.Info("partition targets", zap.Int("segmentTargetNum", len(segmentTargets)), zap.Int("channelTargetNum", len(channelTargets)), zap.Int("totalTargetNum", targetNum), diff --git a/internal/querycoordv2/observers/target_observer.go b/internal/querycoordv2/observers/target_observer.go index 8e69a329930af..f5a09228ef08b 100644 --- a/internal/querycoordv2/observers/target_observer.go +++ b/internal/querycoordv2/observers/target_observer.go @@ -326,7 +326,7 @@ func (ob *TargetObserver) updateNextTarget(collectionID int64) error { log := log.Ctx(context.TODO()).WithRateGroup("qcv2.TargetObserver", 1, 60). With(zap.Int64("collectionID", collectionID)) - log.RatedInfo(10, "observer trigger update next target") + log.Info("observer trigger update next target") err := ob.targetMgr.UpdateCollectionNextTarget(collectionID) if err != nil { log.Warn("failed to update next target for collection", @@ -356,7 +356,7 @@ func (ob *TargetObserver) shouldUpdateCurrentTarget(ctx context.Context, collect channelNames := ob.targetMgr.GetDmChannelsByCollection(collectionID, meta.NextTarget) if len(channelNames) == 0 { // next target is empty, no need to update - log.RatedInfo(10, "next target is empty, no need to update") + log.Info("next target is empty, no need to update") return false } @@ -365,7 +365,7 @@ func (ob *TargetObserver) shouldUpdateCurrentTarget(ctx context.Context, collect nodes := lo.Map(views, func(v *meta.LeaderView, _ int) int64 { return v.ID }) group := utils.GroupNodesByReplica(ob.meta.ReplicaManager, collectionID, nodes) if int32(len(group)) < replicaNum { - log.RatedInfo(10, "channel not ready", + log.Info("channel not ready", zap.Int("readyReplicaNum", len(group)), zap.String("channelName", channel.GetChannelName()), ) @@ -380,7 +380,7 @@ func (ob *TargetObserver) shouldUpdateCurrentTarget(ctx context.Context, collect nodes := lo.Map(views, func(view *meta.LeaderView, _ int) int64 { return view.ID }) group := utils.GroupNodesByReplica(ob.meta.ReplicaManager, collectionID, nodes) if int32(len(group)) < replicaNum { - log.RatedInfo(10, "segment not ready", + log.Info("segment not ready", zap.Int("readyReplicaNum", len(group)), zap.Int64("segmentID", segment.GetID()), ) @@ -396,7 +396,7 @@ func (ob *TargetObserver) shouldUpdateCurrentTarget(ctx context.Context, collect actions = actions[:0] leaderView := ob.distMgr.LeaderViewManager.GetLeaderShardView(leaderID, ch) if leaderView == nil { - log.RatedInfo(10, "leader view not ready", + log.Info("leader view not ready", zap.Int64("nodeID", leaderID), zap.String("channel", ch), ) @@ -507,7 +507,7 @@ func (ob *TargetObserver) checkNeedUpdateTargetVersion(ctx context.Context, lead return nil } - log.RatedInfo(10, "Update readable segment version", + log.Info("Update readable segment version", zap.Int64("collectionID", leaderView.CollectionID), zap.String("channelName", leaderView.Channel), zap.Int64("nodeID", leaderView.ID), @@ -537,7 +537,7 @@ func (ob *TargetObserver) checkNeedUpdateTargetVersion(ctx context.Context, lead func (ob *TargetObserver) updateCurrentTarget(collectionID int64) { log := log.Ctx(context.TODO()).WithRateGroup("qcv2.TargetObserver", 1, 60) - log.RatedInfo(10, "observer trigger update current target", zap.Int64("collectionID", collectionID)) + log.Info("observer trigger update current target", zap.Int64("collectionID", collectionID)) if ob.targetMgr.UpdateCollectionCurrentTarget(collectionID) { ob.mut.Lock() defer ob.mut.Unlock() diff --git a/internal/querynodev2/services.go b/internal/querynodev2/services.go index 085154f6968f0..221d6f120d56e 100644 --- a/internal/querynodev2/services.go +++ b/internal/querynodev2/services.go @@ -1215,7 +1215,7 @@ func (node *QueryNode) GetDataDistribution(ctx context.Context, req *querypb.Get return true }) - return &querypb.GetDataDistributionResponse{ + resp := &querypb.GetDataDistributionResponse{ Status: merr.Success(), NodeID: node.GetNodeID(), Segments: segmentVersionInfos, @@ -1223,14 +1223,16 @@ func (node *QueryNode) GetDataDistribution(ctx context.Context, req *querypb.Get LeaderViews: leaderViews, LastModifyTs: lastModifyTs, MemCapacityInMB: float64(hardware.GetMemoryCount() / 1024 / 1024), - }, nil + } + log.Info("GetDataDistribution done", zap.Any("resp", resp)) + return resp, nil } func (node *QueryNode) SyncDistribution(ctx context.Context, req *querypb.SyncDistributionRequest) (*commonpb.Status, error) { defer node.updateDistributionModifyTS() log := log.Ctx(ctx).With(zap.Int64("collectionID", req.GetCollectionID()), - zap.String("channel", req.GetChannel()), zap.Int64("currentNodeID", node.GetNodeID())) + zap.String("channel", req.GetChannel()), zap.Int64("currentNodeID", node.GetNodeID()), zap.Any("req", req)) // check node healthy if err := node.lifetime.Add(merr.IsHealthy); err != nil { return merr.Status(err), nil