From 22aeb72eba1fdae6d088ebdaf8cf3848d034c96d Mon Sep 17 00:00:00 2001 From: smellthemoon <64083300+smellthemoon@users.noreply.github.com> Date: Fri, 31 Mar 2023 11:28:23 +0800 Subject: [PATCH] Fix LoadSegment req don't fill in collection id (#23136) Signed-off-by: lixinguo Co-authored-by: lixinguo --- internal/querynodev2/services.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/internal/querynodev2/services.go b/internal/querynodev2/services.go index f2691f966f..50c8edfa99 100644 --- a/internal/querynodev2/services.go +++ b/internal/querynodev2/services.go @@ -1006,9 +1006,10 @@ func (node *QueryNode) SyncDistribution(ctx context.Context, req *querypb.SyncDi for nodeID, infos := range addSegments { err := shardDelegator.LoadSegments(ctx, &querypb.LoadSegmentsRequest{ - Base: req.GetBase(), - DstNodeID: nodeID, - Infos: infos, + Base: req.GetBase(), + DstNodeID: nodeID, + Infos: infos, + CollectionID: req.GetCollectionID(), }) if err != nil { return util.WrapStatus(commonpb.ErrorCode_UnexpectedError, "failed to sync(load) segment", err), nil @@ -1017,9 +1018,10 @@ func (node *QueryNode) SyncDistribution(ctx context.Context, req *querypb.SyncDi for _, action := range removeActions { shardDelegator.ReleaseSegments(ctx, &querypb.ReleaseSegmentsRequest{ - NodeID: action.GetNodeID(), - SegmentIDs: []int64{action.GetSegmentID()}, - Scope: querypb.DataScope_Historical, + NodeID: action.GetNodeID(), + SegmentIDs: []int64{action.GetSegmentID()}, + Scope: querypb.DataScope_Historical, + CollectionID: req.GetCollectionID(), }, true) }