From cc5d72a9f2b4920ab14fe9f5e490fcbd53820e11 Mon Sep 17 00:00:00 2001 From: aoiasd <45024769+aoiasd@users.noreply.github.com> Date: Wed, 22 Feb 2023 17:31:46 +0800 Subject: [PATCH] add search option to ignore ignore segment (#21994) Signed-off-by: aoiasd --- internal/proto/internal.proto | 2 + internal/proto/internalpb/internal.pb.go | 295 ++++++++++++----------- internal/proxy/task.go | 17 +- internal/proxy/task_query.go | 15 ++ internal/proxy/task_query_test.go | 6 + internal/proxy/task_search.go | 14 ++ internal/proxy/task_search_test.go | 32 +++ internal/querynode/impl.go | 76 ++---- internal/querynode/impl_test.go | 19 ++ internal/querynode/shard_cluster.go | 85 ++++++- internal/querynode/shard_cluster_test.go | 37 ++- 11 files changed, 365 insertions(+), 233 deletions(-) diff --git a/internal/proto/internal.proto b/internal/proto/internal.proto index a04c2fb9e3..65e721f465 100644 --- a/internal/proto/internal.proto +++ b/internal/proto/internal.proto @@ -171,6 +171,7 @@ message SearchRequest { int64 nq = 14; int64 topk = 15; string metricType = 16; + bool ignoreGrowing = 17; // Optional } message SearchResults { @@ -201,6 +202,7 @@ message RetrieveRequest { uint64 guarantee_timestamp = 9; uint64 timeout_timestamp = 10; int64 limit = 11; // Optional + bool ignoreGrowing = 12; } message RetrieveResults { diff --git a/internal/proto/internalpb/internal.pb.go b/internal/proto/internalpb/internal.pb.go index 4690d50b92..c3aeae91f8 100644 --- a/internal/proto/internalpb/internal.pb.go +++ b/internal/proto/internalpb/internal.pb.go @@ -1321,6 +1321,7 @@ type SearchRequest struct { Nq int64 `protobuf:"varint,14,opt,name=nq,proto3" json:"nq,omitempty"` Topk int64 `protobuf:"varint,15,opt,name=topk,proto3" json:"topk,omitempty"` MetricType string `protobuf:"bytes,16,opt,name=metricType,proto3" json:"metricType,omitempty"` + IgnoreGrowing bool `protobuf:"varint,17,opt,name=ignoreGrowing,proto3" json:"ignoreGrowing,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1463,6 +1464,13 @@ func (m *SearchRequest) GetMetricType() string { return "" } +func (m *SearchRequest) GetIgnoreGrowing() bool { + if m != nil { + return m.IgnoreGrowing + } + return false +} + type SearchResults struct { Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` Status *commonpb.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` @@ -1603,6 +1611,7 @@ type RetrieveRequest struct { GuaranteeTimestamp uint64 `protobuf:"varint,9,opt,name=guarantee_timestamp,json=guaranteeTimestamp,proto3" json:"guarantee_timestamp,omitempty"` TimeoutTimestamp uint64 `protobuf:"varint,10,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` Limit int64 `protobuf:"varint,11,opt,name=limit,proto3" json:"limit,omitempty"` + IgnoreGrowing bool `protobuf:"varint,12,opt,name=ignoreGrowing,proto3" json:"ignoreGrowing,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1710,6 +1719,13 @@ func (m *RetrieveRequest) GetLimit() int64 { return 0 } +func (m *RetrieveRequest) GetIgnoreGrowing() bool { + if m != nil { + return m.IgnoreGrowing + } + return false +} + type RetrieveResults struct { Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` Status *commonpb.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` @@ -2655,143 +2671,144 @@ func init() { func init() { proto.RegisterFile("internal.proto", fileDescriptor_41f4a519b878ee3b) } var fileDescriptor_41f4a519b878ee3b = []byte{ - // 2194 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0xcd, 0x6f, 0xdb, 0xc8, - 0x15, 0x5f, 0x8a, 0x92, 0x25, 0x3d, 0xc9, 0x0a, 0x3d, 0x71, 0xb2, 0x8c, 0x93, 0x6c, 0x1c, 0xf6, - 0xcb, 0x4d, 0xba, 0x49, 0xea, 0xdd, 0x4d, 0x0a, 0xb4, 0xe8, 0x22, 0xb6, 0xb2, 0x81, 0x11, 0x3b, - 0x75, 0xe8, 0x20, 0x40, 0x7b, 0x21, 0x46, 0xe2, 0x58, 0x9a, 0x86, 0xe4, 0x30, 0x33, 0x43, 0x3b, - 0xca, 0xa9, 0x87, 0x9e, 0xba, 0x68, 0x6f, 0xbd, 0x14, 0x68, 0xcf, 0x45, 0x81, 0x02, 0xbd, 0xed, - 0xb1, 0x40, 0x4f, 0x3d, 0xf5, 0xd4, 0xbf, 0xa6, 0xe8, 0xa1, 0x98, 0x19, 0x92, 0xfa, 0xb0, 0xe2, - 0xd8, 0x0e, 0x76, 0x37, 0x05, 0xf6, 0xc6, 0x79, 0xef, 0xcd, 0xd7, 0xef, 0xfd, 0xde, 0xe3, 0x7b, - 0x24, 0x74, 0x68, 0x22, 0x09, 0x4f, 0x70, 0x74, 0x2b, 0xe5, 0x4c, 0x32, 0x74, 0x21, 0xa6, 0xd1, - 0x41, 0x26, 0xcc, 0xe8, 0x56, 0xa1, 0x5c, 0x69, 0xf7, 0x59, 0x1c, 0xb3, 0xc4, 0x88, 0x57, 0xda, - 0xa2, 0x3f, 0x24, 0x31, 0x36, 0x23, 0xef, 0x32, 0x5c, 0x7a, 0x48, 0xe4, 0x53, 0x1a, 0x93, 0xa7, - 0xb4, 0xff, 0x7c, 0x73, 0x88, 0x93, 0x84, 0x44, 0x3e, 0x79, 0x91, 0x11, 0x21, 0xbd, 0xab, 0x70, - 0xf9, 0x21, 0x91, 0x7b, 0x12, 0x4b, 0x2a, 0x24, 0xed, 0x8b, 0x19, 0xf5, 0x05, 0x38, 0xff, 0x90, - 0xc8, 0x6e, 0x38, 0x23, 0x7e, 0x06, 0x8d, 0xc7, 0x2c, 0x24, 0x5b, 0xc9, 0x3e, 0x43, 0x77, 0xa1, - 0x8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, 0x61, 0x01, 0xd9, 0x8a, 0xf7, 0x19, 0xba, 0x0f, 0x35, 0x1c, + 0x04, 0x9c, 0x08, 0xe1, 0x58, 0x2b, 0xd6, 0x6a, 0x73, 0xed, 0xda, 0x9d, 0xa9, 0x35, 0x66, 0x2b, + 0x7b, 0x68, 0x6c, 0xbc, 0xdc, 0x18, 0x21, 0x28, 0x73, 0x16, 0x12, 0xa7, 0xb4, 0x62, 0xad, 0x36, + 0x3c, 0xfd, 0xec, 0xfe, 0x1a, 0x60, 0x2b, 0xa6, 0x72, 0x17, 0x73, 0x1c, 0x09, 0x74, 0x19, 0xaa, + 0xb1, 0x7a, 0x4b, 0x57, 0x3b, 0xb6, 0xbd, 0x6c, 0x84, 0xba, 0xd0, 0x12, 0x12, 0x73, 0xe9, 0x27, + 0xda, 0xce, 0x29, 0xad, 0xd8, 0xab, 0xcd, 0xb5, 0x9b, 0x73, 0x5f, 0xfb, 0x98, 0x8c, 0x9e, 0xe3, + 0x30, 0x25, 0xbb, 0x98, 0x72, 0xaf, 0xa9, 0xa7, 0x19, 0xef, 0xee, 0x2f, 0x01, 0xf6, 0x24, 0xa7, + 0xf1, 0x60, 0x9b, 0x0a, 0xa9, 0xde, 0x75, 0xa0, 0xec, 0xd4, 0x26, 0xec, 0xd5, 0x86, 0x97, 0x8d, + 0xd0, 0x47, 0x50, 0x15, 0x12, 0xcb, 0x54, 0xe8, 0x75, 0x36, 0xd7, 0xae, 0xce, 0x7d, 0xcb, 0x9e, + 0x36, 0xf1, 0x32, 0x53, 0xf7, 0x53, 0x68, 0xe6, 0x70, 0xef, 0x88, 0x01, 0xba, 0x07, 0xe5, 0x1e, + 0x16, 0xe4, 0x44, 0x78, 0x76, 0xc4, 0x60, 0x1d, 0x0b, 0xe2, 0x69, 0x4b, 0xf7, 0xef, 0x25, 0x58, + 0x9a, 0x0a, 0x4b, 0x06, 0xfc, 0xd9, 0x5d, 0x29, 0x98, 0x83, 0xde, 0x56, 0x57, 0x2f, 0xdf, 0xf6, + 0xf4, 0x33, 0x72, 0xa1, 0xd5, 0x67, 0x61, 0x48, 0xfa, 0x92, 0xb2, 0x78, 0xab, 0xeb, 0xd8, 0x5a, + 0x37, 0x25, 0x53, 0x36, 0x09, 0xe6, 0x92, 0x9a, 0xa1, 0x70, 0xca, 0x2b, 0xb6, 0xb2, 0x99, 0x94, + 0xa1, 0x1f, 0x42, 0x47, 0x72, 0x7c, 0x40, 0x42, 0x5f, 0xd2, 0x88, 0x08, 0x89, 0xa3, 0xc4, 0xa9, + 0xac, 0x58, 0xab, 0x65, 0xef, 0x82, 0x91, 0x3f, 0xcb, 0xc5, 0xe8, 0x2e, 0x5c, 0x1c, 0xa4, 0x98, + 0xe3, 0x58, 0x12, 0x32, 0x61, 0x5d, 0xd5, 0xd6, 0xa8, 0x50, 0x8d, 0x27, 0xdc, 0x86, 0x45, 0x65, + 0xc6, 0x52, 0x39, 0x61, 0x5e, 0xd3, 0xe6, 0x9d, 0x4c, 0x51, 0x18, 0xbb, 0x5f, 0x58, 0x70, 0x69, + 0x06, 0x2f, 0x91, 0xb0, 0x58, 0x90, 0x73, 0x00, 0x76, 0x9e, 0x88, 0xa3, 0x07, 0x50, 0x51, 0x4f, + 0xc2, 0xb1, 0x4f, 0xcb, 0x45, 0x63, 0xef, 0xfe, 0xce, 0x86, 0xf7, 0x37, 0x38, 0xc1, 0x92, 0x6c, + 0x14, 0xe8, 0x9f, 0x3f, 0xd8, 0xef, 0x43, 0x2d, 0xe8, 0xf9, 0x31, 0x8e, 0xf2, 0x63, 0x55, 0x0d, + 0x7a, 0x4f, 0x70, 0x44, 0xd0, 0xf7, 0xa1, 0x3d, 0x8e, 0xae, 0x92, 0xe8, 0x98, 0x37, 0xbc, 0x19, + 0x29, 0xfa, 0x2e, 0x2c, 0x14, 0x11, 0xd6, 0x66, 0x65, 0x6d, 0x36, 0x2d, 0x2c, 0x38, 0x55, 0x39, + 0x81, 0x53, 0xd5, 0x39, 0x9c, 0x5a, 0x81, 0xe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x86, 0xae, 0x7e, 0x76, 0xff, + 0x68, 0x41, 0x2b, 0x5b, 0x9d, 0x59, 0xd2, 0x54, 0x94, 0xad, 0xd9, 0x28, 0xeb, 0x12, 0x28, 0x62, + 0x7c, 0xe4, 0x0b, 0xfa, 0x9a, 0x64, 0x0b, 0x02, 0x23, 0xda, 0xa3, 0xaf, 0xc9, 0x14, 0x79, 0xed, + 0x69, 0xf2, 0xde, 0x86, 0x45, 0x4e, 0xfa, 0x24, 0x96, 0xe1, 0xc8, 0x8f, 0x58, 0x40, 0xf7, 0x29, + 0x09, 0x34, 0x1b, 0xea, 0x5e, 0x27, 0x57, 0xec, 0x64, 0x72, 0xf7, 0x37, 0x16, 0x34, 0x77, 0xc4, + 0x60, 0x97, 0x09, 0x7d, 0xc8, 0xd0, 0x4d, 0x68, 0x65, 0x89, 0xcd, 0x9c, 0x70, 0x4b, 0x33, 0xac, + 0xd9, 0x1f, 0x7f, 0xd7, 0x54, 0xa9, 0x3d, 0x12, 0x83, 0x0c, 0xa6, 0x96, 0x67, 0x06, 0x68, 0x19, + 0xea, 0x91, 0x18, 0xe8, 0xba, 0x3e, 0xa3, 0x65, 0x31, 0x56, 0x7b, 0x1d, 0x5f, 0x74, 0x65, 0x7d, + 0xd1, 0x8d, 0x05, 0xee, 0x17, 0x16, 0xa0, 0xec, 0xbb, 0xe9, 0x5b, 0xfd, 0xe6, 0xd0, 0x51, 0x9e, + 0xfc, 0x36, 0x5b, 0xd2, 0x1c, 0x9f, 0x92, 0xcd, 0x24, 0x05, 0xfb, 0x48, 0x52, 0xb8, 0x0d, 0x8b, + 0x01, 0xd9, 0xc7, 0x69, 0x38, 0x79, 0x37, 0x9b, 0x25, 0x77, 0x32, 0xc5, 0xd4, 0x7f, 0x82, 0xf6, + 0x06, 0x27, 0x01, 0x89, 0x25, 0xc5, 0xa1, 0xfe, 0x7d, 0xb5, 0x0c, 0xf5, 0x54, 0x28, 0x26, 0x14, + 0xd8, 0x15, 0x63, 0xf4, 0x21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b, + 0x00, 0x00, 0xff, 0xff, 0xe5, 0x9b, 0x62, 0xbb, 0x4c, 0x1f, 0x00, 0x00, } diff --git a/internal/proxy/task.go b/internal/proxy/task.go index 42da6caa78..e36dd4c989 100644 --- a/internal/proxy/task.go +++ b/internal/proxy/task.go @@ -43,14 +43,15 @@ import ( ) const ( - AnnsFieldKey = "anns_field" - TopKKey = "topk" - NQKey = "nq" - MetricTypeKey = "metric_type" - SearchParamsKey = "params" - RoundDecimalKey = "round_decimal" - OffsetKey = "offset" - LimitKey = "limit" + IgnoreGrowingKey = "ignore_growing" + AnnsFieldKey = "anns_field" + TopKKey = "topk" + NQKey = "nq" + MetricTypeKey = "metric_type" + SearchParamsKey = "params" + RoundDecimalKey = "round_decimal" + OffsetKey = "offset" + LimitKey = "limit" InsertTaskName = "InsertTask" CreateCollectionTaskName = "CreateCollectionTask" diff --git a/internal/proxy/task_query.go b/internal/proxy/task_query.go index 2cfdf3ffa2..99064ff0de 100644 --- a/internal/proxy/task_query.go +++ b/internal/proxy/task_query.go @@ -2,6 +2,7 @@ package proxy import ( "context" + "errors" "fmt" "strconv" "strings" @@ -225,6 +226,20 @@ func (t *queryTask) PreExecute(ctx context.Context) error { zap.Any("collectionName", collectionName), zap.Any("requestType", "query")) + //fetch search_growing from search param + var ignoreGrowing bool + for i, kv := range t.request.GetQueryParams() { + if kv.GetKey() == IgnoreGrowingKey { + ignoreGrowing, err = strconv.ParseBool(kv.Value) + if err != nil { + return errors.New("parse search growing failed") + } + t.request.QueryParams = append(t.request.GetQueryParams()[:i], t.request.GetQueryParams()[i+1:]...) + break + } + } + t.RetrieveRequest.IgnoreGrowing = ignoreGrowing + queryParams, err := parseQueryParams(t.request.GetQueryParams()) if err != nil { return err diff --git a/internal/proxy/task_query_test.go b/internal/proxy/task_query_test.go index 430701e154..f37a136d34 100644 --- a/internal/proxy/task_query_test.go +++ b/internal/proxy/task_query_test.go @@ -154,6 +154,12 @@ func TestQueryTask_all(t *testing.T) { }, CollectionName: collectionName, Expr: expr, + QueryParams: []*commonpb.KeyValuePair{ + { + Key: IgnoreGrowingKey, + Value: "false", + }, + }, }, qc: qc, shardMgr: mgr, diff --git a/internal/proxy/task_search.go b/internal/proxy/task_search.go index 1ac416879f..1720410761 100644 --- a/internal/proxy/task_search.go +++ b/internal/proxy/task_search.go @@ -302,6 +302,20 @@ func (t *searchTask) PreExecute(ctx context.Context) error { log.Ctx(ctx).Debug("translate output fields", zap.Strings("output fields", t.request.GetOutputFields())) + //fetch search_growing from search param + var ignoreGrowing bool + for i, kv := range t.request.GetSearchParams() { + if kv.GetKey() == IgnoreGrowingKey { + ignoreGrowing, err = strconv.ParseBool(kv.GetValue()) + if err != nil { + return errors.New("parse search growing failed") + } + t.request.SearchParams = append(t.request.GetSearchParams()[:i], t.request.GetSearchParams()[i+1:]...) + break + } + } + t.SearchRequest.IgnoreGrowing = ignoreGrowing + if t.request.GetDslType() == commonpb.DslType_BoolExprV1 { annsField, err := funcutil.GetAttrByKeyFromRepeatedKV(AnnsFieldKey, t.request.GetSearchParams()) if err != nil { diff --git a/internal/proxy/task_search_test.go b/internal/proxy/task_search_test.go index ed39c83a48..4c0660d8cd 100644 --- a/internal/proxy/task_search_test.go +++ b/internal/proxy/task_search_test.go @@ -110,9 +110,23 @@ func getValidSearchParams() []*commonpb.KeyValuePair { { Key: RoundDecimalKey, Value: "-1", + }, + { + Key: IgnoreGrowingKey, + Value: "false", }} } +func getInvalidSearchParams(invalidName string) []*commonpb.KeyValuePair { + kvs := getValidSearchParams() + for _, kv := range kvs { + if kv.GetKey() == invalidName { + kv.Value = "invalid" + } + } + return kvs +} + func TestSearchTask_PreExecute(t *testing.T) { var err error @@ -186,6 +200,24 @@ func TestSearchTask_PreExecute(t *testing.T) { assert.Error(t, err) }) + t.Run("invalid IgnoreGrowing param", func(t *testing.T) { + collName := "test_invalid_param" + funcutil.GenRandomStr() + createColl(t, collName, rc) + collID, err := globalMetaCache.GetCollectionID(context.TODO(), collName) + require.NoError(t, err) + qc.EXPECT().ShowCollections( + mock.Anything, mock.MatchedBy(func(req *querypb.ShowCollectionsRequest) bool { return req.CollectionIDs[0] == collID })).Return(&querypb.ShowCollectionsResponse{ + Status: &successStatus, + CollectionIDs: []int64{collID}, + InMemoryPercentages: []int64{100}, + }, nil).Times(1) + + task := getSearchTask(t, collName) + task.request.SearchParams = getInvalidSearchParams(IgnoreGrowingKey) + err = task.PreExecute(ctx) + assert.Error(t, err) + }) + t.Run("invalid collection name", func(t *testing.T) { task := getSearchTask(t, collectionName) createColl(t, collectionName, rc) diff --git a/internal/querynode/impl.go b/internal/querynode/impl.go index 3dfd5ca71b..9aa5242c85 100644 --- a/internal/querynode/impl.go +++ b/internal/querynode/impl.go @@ -236,17 +236,15 @@ func (node *QueryNode) getStatisticsWithDmlChannel(ctx context.Context, req *que defer cancel() var results []*internalpb.GetStatisticsResponse - var streamingResult *internalpb.GetStatisticsResponse var errCluster error - withStreaming := func(ctx context.Context) error { + withStreaming := func(ctx context.Context) (error, *internalpb.GetStatisticsResponse) { streamingTask := newStatistics(ctx, req, querypb.DataScope_Streaming, qs, waitCanDo) err := streamingTask.Execute(ctx) if err != nil { - return err + return err, nil } - streamingResult = streamingTask.Ret - return nil + return nil, streamingTask.Ret } // shard leader dispatches request to its shard cluster @@ -263,7 +261,6 @@ func (node *QueryNode) getStatisticsWithDmlChannel(ctx context.Context, req *que tr.Elapse(fmt.Sprintf("start reduce statistic result, traceID = %s, fromSharedLeader = %t, vChannel = %s, segmentIDs = %v", traceID, req.GetFromShardLeader(), dmlChannel, req.GetSegmentIDs())) - results = append(results, streamingResult) ret, err := reduceStatisticResponse(results) if err != nil { failRet.Status.Reason = err.Error() @@ -878,38 +875,17 @@ func (node *QueryNode) searchWithDmlChannel(ctx context.Context, req *querypb.Se var ( searchCtx, cancel = context.WithCancel(ctx) - - results []*internalpb.SearchResults - streamingResult *internalpb.SearchResults - errCluster error + results []*internalpb.SearchResults + errCluster error ) defer cancel() - withStreaming := func(ctx context.Context) error { - streamingTask, err := newSearchTask(searchCtx, req) - if err != nil { - return err - } - streamingTask.QS = qs - streamingTask.DataScope = querypb.DataScope_Streaming - err = node.scheduler.AddReadTask(searchCtx, streamingTask) - if err != nil { - return err - } - err = streamingTask.WaitToFinish() - if err != nil { - return err - } - metrics.QueryNodeSQLatencyInQueue.WithLabelValues(fmt.Sprint(nodeID), - metrics.SearchLabel).Observe(float64(streamingTask.queueDur.Milliseconds())) - metrics.QueryNodeReduceLatency.WithLabelValues(fmt.Sprint(nodeID), - metrics.SearchLabel).Observe(float64(streamingTask.reduceDur.Milliseconds())) - streamingResult = streamingTask.Ret - return nil - } - // shard leader dispatches request to its shard cluster - results, errCluster = cluster.Search(searchCtx, req, withStreaming) + var withStreamingFunc searchWithStreaming + if !req.Req.IgnoreGrowing { + withStreamingFunc = getSearchWithStreamingFunc(searchCtx, req, node, qs, nodeID) + } + results, errCluster = cluster.Search(searchCtx, req, withStreamingFunc) if errCluster != nil { log.Ctx(ctx).Warn("search shard cluster failed", zap.String("vChannel", dmlChannel), zap.Error(errCluster)) failRet.Status.Reason = errCluster.Error() @@ -918,7 +894,6 @@ func (node *QueryNode) searchWithDmlChannel(ctx context.Context, req *querypb.Se tr.CtxElapse(ctx, fmt.Sprintf("do search done in shard cluster, vChannel = %s, segmentIDs = %v", dmlChannel, req.GetSegmentIDs())) - results = append(results, streamingResult) ret, err2 := reduceSearchResults(ctx, results, req.Req.GetNq(), req.Req.GetTopk(), req.Req.GetMetricType()) if err2 != nil { failRet.Status.Reason = err2.Error() @@ -1029,32 +1004,14 @@ func (node *QueryNode) queryWithDmlChannel(ctx context.Context, req *querypb.Que defer cancel() var results []*internalpb.RetrieveResults - var streamingResult *internalpb.RetrieveResults - - withStreaming := func(ctx context.Context) error { - streamingTask := newQueryTask(queryCtx, req) - streamingTask.DataScope = querypb.DataScope_Streaming - streamingTask.QS = qs - err := node.scheduler.AddReadTask(queryCtx, streamingTask) - - if err != nil { - return err - } - err = streamingTask.WaitToFinish() - if err != nil { - return err - } - metrics.QueryNodeSQLatencyInQueue.WithLabelValues(fmt.Sprint(nodeID), - metrics.QueryLabel).Observe(float64(streamingTask.queueDur.Milliseconds())) - metrics.QueryNodeReduceLatency.WithLabelValues(fmt.Sprint(nodeID), - metrics.QueryLabel).Observe(float64(streamingTask.reduceDur.Milliseconds())) - streamingResult = streamingTask.Ret - return nil - } - var errCluster error + var withStreamingFunc queryWithStreaming + + if !req.Req.IgnoreGrowing { + withStreamingFunc = getQueryWithStreamingFunc(queryCtx, req, node, qs, nodeID) + } // shard leader dispatches request to its shard cluster - results, errCluster = cluster.Query(queryCtx, req, withStreaming) + results, errCluster = cluster.Query(queryCtx, req, withStreamingFunc) if errCluster != nil { log.Ctx(ctx).Warn("failed to query cluster", zap.Int64("collectionID", req.Req.GetCollectionID()), @@ -1066,7 +1023,6 @@ func (node *QueryNode) queryWithDmlChannel(ctx context.Context, req *querypb.Que tr.CtxElapse(ctx, fmt.Sprintf("start reduce query result, fromSharedLeader = %t, vChannel = %s, segmentIDs = %v", req.GetFromShardLeader(), dmlChannel, req.GetSegmentIDs())) - results = append(results, streamingResult) ret, err2 := mergeInternalRetrieveResultsAndFillIfEmpty(ctx, results, req.Req.GetLimit(), req.GetReq().GetOutputFieldsId(), qs.collection.Schema()) if err2 != nil { failRet.Status.Reason = err2.Error() diff --git a/internal/querynode/impl_test.go b/internal/querynode/impl_test.go index 877a72878f..edf854986f 100644 --- a/internal/querynode/impl_test.go +++ b/internal/querynode/impl_test.go @@ -789,6 +789,15 @@ func TestImpl_searchWithDmlChannel(t *testing.T) { DmlChannels: []string{defaultDMLChannel}, }, defaultDMLChannel) assert.NoError(t, err) + // search with ignore growing segment + req.IgnoreGrowing = true + _, err = node.searchWithDmlChannel(ctx, &queryPb.SearchRequest{ + Req: req, + FromShardLeader: false, + DmlChannels: []string{defaultDMLChannel}, + }, defaultDMLChannel) + assert.NoError(t, err) + req.IgnoreGrowing = false // search for wrong dml channel _, err = node.searchWithDmlChannel(ctx, &queryPb.SearchRequest{ @@ -910,6 +919,16 @@ func TestImpl_queryWithDmlChannel(t *testing.T) { }, defaultDMLChannel) assert.NoError(t, err) + // query with ignore growing + req.IgnoreGrowing = true + _, err = node.queryWithDmlChannel(ctx, &queryPb.QueryRequest{ + Req: req, + FromShardLeader: false, + DmlChannels: []string{defaultDMLChannel}, + }, defaultDMLChannel) + assert.NoError(t, err) + req.IgnoreGrowing = false + // query for wrong dml channel _, err = node.queryWithDmlChannel(ctx, &queryPb.QueryRequest{ Req: req, diff --git a/internal/querynode/shard_cluster.go b/internal/querynode/shard_cluster.go index 3822cb2a29..28cb8dad47 100644 --- a/internal/querynode/shard_cluster.go +++ b/internal/querynode/shard_cluster.go @@ -30,6 +30,7 @@ import ( "github.com/milvus-io/milvus-proto/go-api/commonpb" "github.com/milvus-io/milvus/internal/common" "github.com/milvus-io/milvus/internal/log" + "github.com/milvus-io/milvus/internal/metrics" "github.com/milvus-io/milvus/internal/proto/internalpb" "github.com/milvus-io/milvus/internal/proto/querypb" "github.com/milvus-io/milvus/internal/util/funcutil" @@ -126,7 +127,9 @@ type ShardSegmentDetector interface { type ShardNodeBuilder func(nodeID int64, addr string) shardQueryNode // withStreaming function type to let search detects corresponding search streaming is done. -type withStreaming func(ctx context.Context) error +type searchWithStreaming func(ctx context.Context) (error, *internalpb.SearchResults) +type queryWithStreaming func(ctx context.Context) (error, *internalpb.RetrieveResults) +type getStatisticsWithStreaming func(ctx context.Context) (error, *internalpb.GetStatisticsResponse) // ShardCluster maintains the ShardCluster information and perform shard level operations type ShardCluster struct { @@ -824,7 +827,7 @@ func (sc *ShardCluster) segmentsOnline(segments []shardSegmentInfo) bool { } // GetStatistics returns the statistics on the shard cluster. -func (sc *ShardCluster) GetStatistics(ctx context.Context, req *querypb.GetStatisticsRequest, withStreaming withStreaming) ([]*internalpb.GetStatisticsResponse, error) { +func (sc *ShardCluster) GetStatistics(ctx context.Context, req *querypb.GetStatisticsRequest, withStreaming getStatisticsWithStreaming) ([]*internalpb.GetStatisticsResponse, error) { if !sc.serviceable() { return nil, fmt.Errorf("ShardCluster for %s replicaID %d is not available", sc.vchannelName, sc.replicaID) } @@ -854,7 +857,11 @@ func (sc *ShardCluster) GetStatistics(ctx context.Context, req *querypb.GetStati wg.Add(1) go func() { defer wg.Done() - streamErr := withStreaming(reqCtx) + if withStreaming == nil { + return + } + + streamErr, streamResult := withStreaming(reqCtx) resultMut.Lock() defer resultMut.Unlock() if streamErr != nil { @@ -864,6 +871,9 @@ func (sc *ShardCluster) GetStatistics(ctx context.Context, req *querypb.GetStati err = fmt.Errorf("stream operation failed: %w", streamErr) } } + if streamResult != nil { + results = append(results, streamResult) + } }() // dispatch request to followers @@ -907,7 +917,7 @@ func (sc *ShardCluster) GetStatistics(ctx context.Context, req *querypb.GetStati } // Search preforms search operation on shard cluster. -func (sc *ShardCluster) Search(ctx context.Context, req *querypb.SearchRequest, withStreaming withStreaming) ([]*internalpb.SearchResults, error) { +func (sc *ShardCluster) Search(ctx context.Context, req *querypb.SearchRequest, withStreaming searchWithStreaming) ([]*internalpb.SearchResults, error) { log := log.Ctx(ctx) if !sc.serviceable() { err := WrapErrShardNotAvailable(sc.replicaID, sc.vchannelName) @@ -946,8 +956,11 @@ func (sc *ShardCluster) Search(ctx context.Context, req *querypb.SearchRequest, wg.Add(1) go func() { defer wg.Done() + if withStreaming == nil { + return + } - streamErr := withStreaming(reqCtx) + streamErr, streamResult := withStreaming(reqCtx) resultMut.Lock() defer resultMut.Unlock() if streamErr != nil { @@ -956,6 +969,9 @@ func (sc *ShardCluster) Search(ctx context.Context, req *querypb.SearchRequest, } cancel() } + if streamResult != nil { + results = append(results, streamResult) + } }() // dispatch request to followers @@ -1009,7 +1025,7 @@ func (sc *ShardCluster) Search(ctx context.Context, req *querypb.SearchRequest, } // Query performs query operation on shard cluster. -func (sc *ShardCluster) Query(ctx context.Context, req *querypb.QueryRequest, withStreaming withStreaming) ([]*internalpb.RetrieveResults, error) { +func (sc *ShardCluster) Query(ctx context.Context, req *querypb.QueryRequest, withStreaming queryWithStreaming) ([]*internalpb.RetrieveResults, error) { if !sc.serviceable() { return nil, WrapErrShardNotAvailable(sc.replicaID, sc.vchannelName) } @@ -1030,20 +1046,29 @@ func (sc *ShardCluster) Query(ctx context.Context, req *querypb.QueryRequest, wi var err error var resultMut sync.Mutex + results := make([]*internalpb.RetrieveResults, 0, len(segAllocs)+1) // count(nodes) + 1(growing) // detect corresponding streaming query is done wg.Add(1) go func() { defer wg.Done() + if withStreaming == nil { + return + } - streamErr := withStreaming(reqCtx) + streamErr, streamResult := withStreaming(reqCtx) + resultMut.Lock() + defer resultMut.Unlock() if streamErr != nil { if err == nil { err = fmt.Errorf("stream operation failed: %w", streamErr) } cancel() } + if streamResult != nil { + results = append(results, streamResult) + } }() // dispatch request to followers @@ -1098,3 +1123,49 @@ func (sc *ShardCluster) GetSegmentInfos() []shardSegmentInfo { func (sc *ShardCluster) getVersion() int64 { return sc.version } + +func getSearchWithStreamingFunc(searchCtx context.Context, req *querypb.SearchRequest, node *QueryNode, qs *queryShard, nodeID int64) searchWithStreaming { + return func(ctx context.Context) (error, *internalpb.SearchResults) { + streamingTask, err := newSearchTask(searchCtx, req) + if err != nil { + return err, nil + } + streamingTask.QS = qs + streamingTask.DataScope = querypb.DataScope_Streaming + err = node.scheduler.AddReadTask(searchCtx, streamingTask) + if err != nil { + return err, nil + } + err = streamingTask.WaitToFinish() + if err != nil { + return err, nil + } + metrics.QueryNodeSQLatencyInQueue.WithLabelValues(fmt.Sprint(nodeID), + metrics.SearchLabel).Observe(float64(streamingTask.queueDur.Milliseconds())) + metrics.QueryNodeReduceLatency.WithLabelValues(fmt.Sprint(nodeID), + metrics.SearchLabel).Observe(float64(streamingTask.reduceDur.Milliseconds())) + return nil, streamingTask.Ret + } +} + +func getQueryWithStreamingFunc(queryCtx context.Context, req *querypb.QueryRequest, node *QueryNode, qs *queryShard, nodeID int64) queryWithStreaming { + return func(ctx context.Context) (error, *internalpb.RetrieveResults) { + streamingTask := newQueryTask(queryCtx, req) + streamingTask.DataScope = querypb.DataScope_Streaming + streamingTask.QS = qs + err := node.scheduler.AddReadTask(queryCtx, streamingTask) + + if err != nil { + return err, nil + } + err = streamingTask.WaitToFinish() + if err != nil { + return err, nil + } + metrics.QueryNodeSQLatencyInQueue.WithLabelValues(fmt.Sprint(nodeID), + metrics.QueryLabel).Observe(float64(streamingTask.queueDur.Milliseconds())) + metrics.QueryNodeReduceLatency.WithLabelValues(fmt.Sprint(nodeID), + metrics.QueryLabel).Observe(float64(streamingTask.reduceDur.Milliseconds())) + return nil, streamingTask.Ret + } +} diff --git a/internal/querynode/shard_cluster_test.go b/internal/querynode/shard_cluster_test.go index 5e2d5e161a..f49c1620f8 100644 --- a/internal/querynode/shard_cluster_test.go +++ b/internal/querynode/shard_cluster_test.go @@ -1049,7 +1049,6 @@ func TestShardCluster_SyncSegments(t *testing.T) { }) } -var streamingDoNothing = func(context.Context) error { return nil } var streamingError = func(context.Context) error { return errors.New("mock streaming error") } func TestShardCluster_Search(t *testing.T) { @@ -1103,7 +1102,7 @@ func TestShardCluster_Search(t *testing.T) { _, err := sc.Search(ctx, &querypb.SearchRequest{ DmlChannels: []string{vchannelName}, - }, streamingDoNothing) + }, nil) assert.Error(t, err) }) @@ -1115,7 +1114,7 @@ func TestShardCluster_Search(t *testing.T) { _, err := sc.Search(ctx, &querypb.SearchRequest{ DmlChannels: []string{vchannelName + "_suffix"}, - }, streamingDoNothing) + }, nil) assert.Error(t, err) }) @@ -1168,7 +1167,7 @@ func TestShardCluster_Search(t *testing.T) { Base: &commonpb.MsgBase{}, }, DmlChannels: []string{vchannelName}, - }, streamingDoNothing) + }, nil) assert.NoError(t, err) assert.Equal(t, len(nodeEvents), len(result)) }) @@ -1222,7 +1221,7 @@ func TestShardCluster_Search(t *testing.T) { Base: &commonpb.MsgBase{}, }, DmlChannels: []string{vchannelName}, - }, func(ctx context.Context) error { return errors.New("mocked") }) + }, func(ctx context.Context) (error, *internalpb.SearchResults) { return errors.New("mocked"), nil }) assert.Error(t, err) }) @@ -1283,7 +1282,7 @@ func TestShardCluster_Search(t *testing.T) { Base: &commonpb.MsgBase{}, }, DmlChannels: []string{vchannelName}, - }, streamingDoNothing) + }, nil) assert.Error(t, err) }) @@ -1338,7 +1337,7 @@ func TestShardCluster_Search(t *testing.T) { Base: &commonpb.MsgBase{}, }, DmlChannels: []string{vchannelName}, - }, streamingDoNothing) + }, nil) assert.Error(t, err) }) } @@ -1401,7 +1400,7 @@ func TestShardCluster_Query(t *testing.T) { Base: &commonpb.MsgBase{}, }, DmlChannels: []string{vchannelName}, - }, streamingDoNothing) + }, nil) assert.Error(t, err) }) t.Run("query wrong channel", func(t *testing.T) { @@ -1417,7 +1416,7 @@ func TestShardCluster_Query(t *testing.T) { Base: &commonpb.MsgBase{}, }, DmlChannels: []string{vchannelName + "_suffix"}, - }, streamingDoNothing) + }, nil) assert.Error(t, err) }) t.Run("normal query", func(t *testing.T) { @@ -1469,7 +1468,7 @@ func TestShardCluster_Query(t *testing.T) { Base: &commonpb.MsgBase{}, }, DmlChannels: []string{vchannelName}, - }, streamingDoNothing) + }, nil) assert.NoError(t, err) assert.Equal(t, len(nodeEvents), len(result)) }) @@ -1522,7 +1521,7 @@ func TestShardCluster_Query(t *testing.T) { Base: &commonpb.MsgBase{}, }, DmlChannels: []string{vchannelName}, - }, func(ctx context.Context) error { return errors.New("mocked") }) + }, func(ctx context.Context) (error, *internalpb.RetrieveResults) { return errors.New("mocked"), nil }) assert.Error(t, err) }) @@ -1583,7 +1582,7 @@ func TestShardCluster_Query(t *testing.T) { Base: &commonpb.MsgBase{}, }, DmlChannels: []string{vchannelName}, - }, streamingDoNothing) + }, nil) assert.Error(t, err) }) t.Run("test meta error", func(t *testing.T) { @@ -1639,7 +1638,7 @@ func TestShardCluster_Query(t *testing.T) { Base: &commonpb.MsgBase{}, }, DmlChannels: []string{vchannelName}, - }, streamingDoNothing) + }, nil) assert.Error(t, err) }) @@ -1696,7 +1695,7 @@ func TestShardCluster_GetStatistics(t *testing.T) { _, err := sc.GetStatistics(ctx, &querypb.GetStatisticsRequest{ DmlChannels: []string{vchannelName}, - }, streamingDoNothing) + }, nil) assert.Error(t, err) }) @@ -1708,7 +1707,7 @@ func TestShardCluster_GetStatistics(t *testing.T) { _, err := sc.GetStatistics(ctx, &querypb.GetStatisticsRequest{ DmlChannels: []string{vchannelName + "_suffix"}, - }, streamingDoNothing) + }, nil) assert.Error(t, err) }) @@ -1758,7 +1757,7 @@ func TestShardCluster_GetStatistics(t *testing.T) { result, err := sc.GetStatistics(ctx, &querypb.GetStatisticsRequest{ DmlChannels: []string{vchannelName}, - }, streamingDoNothing) + }, nil) assert.NoError(t, err) assert.Equal(t, len(nodeEvents), len(result)) }) @@ -1809,7 +1808,7 @@ func TestShardCluster_GetStatistics(t *testing.T) { _, err := sc.GetStatistics(ctx, &querypb.GetStatisticsRequest{ DmlChannels: []string{vchannelName}, - }, func(ctx context.Context) error { return errors.New("mocked") }) + }, func(ctx context.Context) (error, *internalpb.GetStatisticsResponse) { return errors.New("mocked"), nil }) assert.Error(t, err) }) @@ -1868,7 +1867,7 @@ func TestShardCluster_GetStatistics(t *testing.T) { _, err := sc.GetStatistics(ctx, &querypb.GetStatisticsRequest{ DmlChannels: []string{vchannelName}, - }, streamingDoNothing) + }, nil) assert.Error(t, err) }) @@ -1919,7 +1918,7 @@ func TestShardCluster_GetStatistics(t *testing.T) { _, err := sc.GetStatistics(ctx, &querypb.GetStatisticsRequest{ DmlChannels: []string{vchannelName}, - }, streamingDoNothing) + }, nil) assert.Error(t, err) }) }