Fix LoadSegment req don't fill in collection id (#23136)

Signed-off-by: lixinguo <xinguo.li@zilliz.com>
Co-authored-by: lixinguo <xinguo.li@zilliz.com>
This commit is contained in:
smellthemoon 2023-03-31 11:28:23 +08:00 committed by GitHub
parent 7612c75c47
commit 22aeb72eba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
}