Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: bigsheeper <[email protected]>
  • Loading branch information
bigsheeper committed Nov 4, 2024
1 parent 1e580ae commit a7e96f4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion internal/querycoordv2/observers/target_observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit a7e96f4

Please sign in to comment.