diff --git a/internal/querynode/shard_cluster.go b/internal/querynode/shard_cluster.go index f6d6808b3920ee96f04a481c72ad79d47a5d1d8c..486521922c9d657ebdf025195d13da170952bc8e 100644 --- a/internal/querynode/shard_cluster.go +++ b/internal/querynode/shard_cluster.go @@ -301,6 +301,8 @@ func (sc *ShardCluster) SyncSegments(distribution []*querypb.ReplicaSegmentsInfo }) } } + + allocations := sc.segments.Clone(filterNothing) sc.mut.Unlock() // notify handoff wait online if any @@ -310,7 +312,7 @@ func (sc *ShardCluster) SyncSegments(distribution []*querypb.ReplicaSegmentsInfo sc.mutVersion.Lock() defer sc.mutVersion.Unlock() - version := NewShardClusterVersion(sc.nextVersionID.Inc(), sc.segments.Clone(filterNothing)) + version := NewShardClusterVersion(sc.nextVersionID.Inc(), allocations) sc.versions.Store(version.versionID, version) sc.currentVersion = version }