mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Cherry-pick from master pr: #31500 See also #31495 --------- Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
99774548f2
commit
5d3aa2a496
@ -370,13 +370,13 @@ func (c *SegmentChecker) createSegmentLoadTasks(ctx context.Context, segments []
|
||||
plans := make([]balance.SegmentAssignPlan, 0)
|
||||
for shard, segments := range shardSegments {
|
||||
// if channel is not subscribed yet, skip load segments
|
||||
if len(c.dist.LeaderViewManager.GetLeadersByShard(shard)) == 0 {
|
||||
leader := c.dist.LeaderViewManager.GetLatestLeadersByReplicaShard(replica, shard)
|
||||
if leader == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
// L0 segment can only be assign to shard leader's node
|
||||
if isLevel0 {
|
||||
leader := c.dist.LeaderViewManager.GetLatestLeadersByReplicaShard(replica, shard)
|
||||
availableNodes = []int64{leader.ID}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user