mirror of https://github.com/milvus-io/milvus.git
Remove partition target check in querynodev2 (#23188)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/23188/merge
parent
9ad6d9f1a0
commit
3af3fe52d8
|
@ -111,7 +111,7 @@ func (suite *FilterNodeSuite) TestWithLoadCollection() {
|
|||
//test filter node with collection load partition
|
||||
func (suite *FilterNodeSuite) TestWithLoadPartation() {
|
||||
//data
|
||||
suite.validSegmentIDs = []int64{2, 4, 6}
|
||||
suite.validSegmentIDs = []int64{2, 3, 4, 5, 6}
|
||||
|
||||
//mock
|
||||
collection := segments.NewCollectionWithoutSchema(suite.collectionID, querypb.LoadType_LoadPartition)
|
||||
|
@ -138,7 +138,7 @@ func (suite *FilterNodeSuite) TestWithLoadPartation() {
|
|||
for _, msg := range nodeMsg.insertMsgs {
|
||||
suite.True(lo.Contains(suite.validSegmentIDs, msg.SegmentID))
|
||||
}
|
||||
suite.Equal(suite.deleteSegmentSum/2, len(nodeMsg.deleteMsgs))
|
||||
suite.Equal(suite.deleteSegmentSum, len(nodeMsg.deleteMsgs))
|
||||
}
|
||||
|
||||
func (suite *FilterNodeSuite) buildMsgPack() *msgstream.MsgPack {
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
|
||||
package pipeline
|
||||
|
||||
import "github.com/milvus-io/milvus/internal/common"
|
||||
|
||||
//MsgFilter will return error if Msg was invalid
|
||||
type InsertMsgFilter = func(n *filterNode, c *Collection, msg *InsertMsg) error
|
||||
type DeleteMsgFilter = func(n *filterNode, c *Collection, msg *DeleteMsg) error
|
||||
|
@ -44,11 +42,7 @@ func InsertOutOfTarget(n *filterNode, c *Collection, msg *InsertMsg) error {
|
|||
return WrapErrMsgNotTarget("Collection")
|
||||
}
|
||||
|
||||
if c.GetLoadType() == loadTypePartition {
|
||||
if msg.PartitionID != common.InvalidPartitionID && !c.ExistPartition(msg.PartitionID) {
|
||||
return WrapErrMsgNotTarget("Partition")
|
||||
}
|
||||
}
|
||||
// all growing will be be in-memory to support dynamic partition load/release
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -82,10 +76,7 @@ func DeleteOutOfTarget(n *filterNode, c *Collection, msg *DeleteMsg) error {
|
|||
if msg.GetCollectionID() != c.ID() {
|
||||
return WrapErrMsgNotTarget("Collection")
|
||||
}
|
||||
if c.GetLoadType() == loadTypePartition {
|
||||
if msg.PartitionID != common.InvalidPartitionID && !c.ExistPartition(msg.PartitionID) {
|
||||
return WrapErrMsgNotTarget("Partition")
|
||||
}
|
||||
}
|
||||
|
||||
// all growing will be be in-memory to support dynamic partition load/release
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue