mirror of https://github.com/milvus-io/milvus.git
Fix QueryCollection retrieve unit test (#16376)
Signed-off-by: Letian Jiang <letian.jiang@zilliz.com>pull/16385/head
parent
2bd0a9526a
commit
09b90fd8bf
|
@ -1459,8 +1459,8 @@ func genSimpleRetrievePlanExpr() ([]byte, error) {
|
|||
Expr: &planpb.Expr_TermExpr{
|
||||
TermExpr: &planpb.TermExpr{
|
||||
ColumnInfo: &planpb.ColumnInfo{
|
||||
FieldId: simpleConstField.id,
|
||||
DataType: simpleConstField.dataType,
|
||||
FieldId: simplePKField.id,
|
||||
DataType: simplePKField.dataType,
|
||||
},
|
||||
Values: []*planpb.GenericValue{
|
||||
{
|
||||
|
@ -1483,7 +1483,7 @@ func genSimpleRetrievePlanExpr() ([]byte, error) {
|
|||
},
|
||||
},
|
||||
},
|
||||
OutputFieldIds: []int64{simpleConstField.id},
|
||||
OutputFieldIds: []int64{simplePKField.id},
|
||||
}
|
||||
planExpr, err := proto.Marshal(planNode)
|
||||
return planExpr, err
|
||||
|
|
|
@ -1333,6 +1333,7 @@ func (q *queryCollection) retrieve(msg queryMsg) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
log.Debug("retrieve result", zap.String("ids", result.Ids.String()))
|
||||
reduceDuration := tr.Record(fmt.Sprintf("merge result done, msgID = %d", retrieveMsg.ID()))
|
||||
metrics.QueryNodeReduceLatency.WithLabelValues(fmt.Sprint(Params.QueryNodeCfg.QueryNodeID), metrics.QueryLabel).Observe(float64(reduceDuration.Milliseconds()))
|
||||
|
||||
|
|
|
@ -656,7 +656,7 @@ func TestQueryCollection_search(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestQueryCollection_receive(t *testing.T) {
|
||||
func TestQueryCollection_retrieve(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
||||
queryCollection, err := genSimpleQueryCollection(ctx, cancel)
|
||||
|
@ -677,12 +677,6 @@ func TestQueryCollection_receive(t *testing.T) {
|
|||
|
||||
queryCollection.vectorChunkManager = vecCM
|
||||
|
||||
err = queryCollection.streaming.replica.removeSegment(defaultSegmentID)
|
||||
assert.NoError(t, err)
|
||||
|
||||
err = queryCollection.historical.replica.removeSegment(defaultSegmentID)
|
||||
assert.NoError(t, err)
|
||||
|
||||
msg, err := genSimpleRetrieveMsg()
|
||||
assert.NoError(t, err)
|
||||
|
||||
|
|
Loading…
Reference in New Issue