mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
fix: [2.5] querycoord panic in cornor case (#40058)
issue: #40050 pr: #40057 Signed-off-by: Wei Liu <wei.liu@zilliz.com>
This commit is contained in:
parent
b7c631f0b7
commit
e42c944e04
@ -369,6 +369,9 @@ func (c *SegmentChecker) filterExistedOnLeader(replica *meta.Replica, segments [
|
||||
}
|
||||
|
||||
view := c.dist.LeaderViewManager.GetLeaderShardView(leaderID, s.GetInsertChannel())
|
||||
if view == nil {
|
||||
continue
|
||||
}
|
||||
seg, ok := view.Segments[s.GetID()]
|
||||
if ok && seg.NodeID == s.Node {
|
||||
// if this segment is serving on leader, do not remove it for search available
|
||||
@ -388,6 +391,9 @@ func (c *SegmentChecker) filterSegmentInUse(ctx context.Context, replica *meta.R
|
||||
}
|
||||
|
||||
view := c.dist.LeaderViewManager.GetLeaderShardView(leaderID, s.GetInsertChannel())
|
||||
if view == nil {
|
||||
continue
|
||||
}
|
||||
currentTargetVersion := c.targetMgr.GetCollectionTargetVersion(ctx, s.CollectionID, meta.CurrentTarget)
|
||||
partition := c.meta.CollectionManager.GetPartition(ctx, s.PartitionID)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user