Skip to content

Commit

Permalink
enhance: Add log for case which target not update as expected
Browse files Browse the repository at this point in the history
Signed-off-by: Wei Liu <[email protected]>
  • Loading branch information
weiliu1031 committed Jan 2, 2025
1 parent 907fc24 commit 257fc23
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion internal/querycoordv2/observers/target_observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,16 @@ func (ob *TargetObserver) shouldUpdateCurrentTarget(ctx context.Context, collect
collectionReadyLeaders := make([]*meta.LeaderView, 0)
for channel := range channelNames {
channelReadyLeaders := lo.Filter(ob.distMgr.LeaderViewManager.GetByFilter(meta.WithChannelName2LeaderView(channel)), func(leader *meta.LeaderView, _ int) bool {
return utils.CheckDelegatorDataReady(ob.nodeMgr, ob.targetMgr, leader, meta.NextTarget) == nil
err := utils.CheckDelegatorDataReady(ob.nodeMgr, ob.targetMgr, leader, meta.NextTarget)
if err != nil {
log.Info("leader is not available",
zap.Int64("collectionID", collectionID),
zap.Int64("nodeID", leader.ID),
zap.String("channelName", channel),
zap.Error(err))
return false
}
return true
})

// to avoid stuck here in dynamic increase replica case, we just check available delegator number
Expand Down

0 comments on commit 257fc23

Please sign in to comment.