From a7e96f4089ddece3a245ad5bf42c843684d3c58b Mon Sep 17 00:00:00 2001 From: bigsheeper Date: Mon, 4 Nov 2024 22:01:01 +0800 Subject: [PATCH] update Signed-off-by: bigsheeper --- internal/querycoordv2/observers/target_observer.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/internal/querycoordv2/observers/target_observer.go b/internal/querycoordv2/observers/target_observer.go index f5a09228ef08b..6732d66a6661b 100644 --- a/internal/querycoordv2/observers/target_observer.go +++ b/internal/querycoordv2/observers/target_observer.go @@ -351,7 +351,7 @@ func (ob *TargetObserver) shouldUpdateCurrentTarget(ctx context.Context, collect zap.Int64("collectionID", collectionID), zap.Int32("replicaNum", replicaNum), ) - + log.Info("shouldUpdateCurrentTarget") // check channel first channelNames := ob.targetMgr.GetDmChannelsByCollection(collectionID, meta.NextTarget) if len(channelNames) == 0 { @@ -406,6 +406,7 @@ func (ob *TargetObserver) shouldUpdateCurrentTarget(ctx context.Context, collect if updateVersionAction != nil { actions = append(actions, updateVersionAction) } + log.Info("begin to sync", zap.Any("actions", actions)) if !ob.sync(ctx, replica, leaderView, actions) { return false } @@ -503,6 +504,13 @@ func (ob *TargetObserver) checkNeedUpdateTargetVersion(ctx context.Context, lead log.Ctx(ctx).WithRateGroup("qcv2.LeaderObserver", 1, 60) targetVersion := ob.targetMgr.GetCollectionTargetVersion(leaderView.CollectionID, meta.NextTarget) + log.Info("checkNeedUpdateTargetVersion", + zap.Int64("collectionID", leaderView.CollectionID), + zap.String("channelName", leaderView.Channel), + zap.Int64("nodeID", leaderView.ID), + zap.Int64("oldVersion", leaderView.TargetVersion), + zap.Int64("newVersion", targetVersion)) + if targetVersion <= leaderView.TargetVersion { return nil }