mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Set collectionID in FlushSegmentsRequest (#14563)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
b063bfda8f
commit
9e036af714
@ -83,8 +83,11 @@ func (c *Cluster) Flush(ctx context.Context, segments []*datapb.SegmentInfo, mar
|
||||
channelNodes[ch.Name] = c.NodeID
|
||||
}
|
||||
}
|
||||
// collectionID shall be the same in single Flush call
|
||||
var collectionID int64
|
||||
// find node on which segment exists
|
||||
for _, segment := range segments {
|
||||
collectionID = segment.CollectionID
|
||||
nodeID, ok := channelNodes[segment.GetInsertChannel()]
|
||||
if !ok {
|
||||
log.Warn("channel is not allocated to any node", zap.String("channel", segment.GetInsertChannel()))
|
||||
@ -94,6 +97,7 @@ func (c *Cluster) Flush(ctx context.Context, segments []*datapb.SegmentInfo, mar
|
||||
targetNodes[nodeID] = struct{}{}
|
||||
}
|
||||
for _, segment := range markSegments {
|
||||
collectionID = segment.CollectionID
|
||||
nodeID, ok := channelNodes[segment.GetInsertChannel()]
|
||||
if !ok {
|
||||
log.Warn("channel is not allocated to any node", zap.String("channel", segment.GetInsertChannel()))
|
||||
@ -114,6 +118,7 @@ func (c *Cluster) Flush(ctx context.Context, segments []*datapb.SegmentInfo, mar
|
||||
MsgType: commonpb.MsgType_Flush,
|
||||
SourceID: Params.DataCoordCfg.NodeID,
|
||||
},
|
||||
CollectionID: collectionID,
|
||||
SegmentIDs: segments,
|
||||
MarkSegmentIDs: marks,
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user