未验证 提交 09b90fd8 编写于 作者: L Letian Jiang 提交者: GitHub

Fix QueryCollection retrieve unit test (#16376)

Signed-off-by: NLetian Jiang <letian.jiang@zilliz.com>
上级 2bd0a952
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册