From 7cf2be09b5b1884b0266e071e00ec09bd1242d7f Mon Sep 17 00:00:00 2001 From: "zhenshan.cao" Date: Thu, 11 Jan 2024 14:42:49 +0800 Subject: [PATCH] fix: Restore the MVCC functionality. (#29749) (#29802) When the TimeTravel functionality was previously removed, it inadvertently affected the MVCC functionality within the system. This PR aims to reintroduce the internal MVCC functionality as follows: 1. Add MvccTimestamp to the requests of Search/Query and the results of Search internally. 2. When the delegator receives a Query/Search request and there is no MVCC timestamp set in the request, set the delegator's current tsafe as the MVCC timestamp of the request. If the request already has an MVCC timestamp, do not modify it. 3. When the Proxy handles Search and triggers the second phase ReQuery, divide the ReQuery into different shards and pass the MVCC timestamp to the corresponding Query requests. issue: #29656 pr: #29749 Signed-off-by: zhenshan.cao --- internal/core/src/common/Channel.h | 11 + .../core/src/segcore/SegmentInterface.cpp | 5 +- internal/core/src/segcore/SegmentInterface.h | 6 +- internal/core/src/segcore/segment_c.cpp | 3 +- internal/core/src/segcore/segment_c.h | 1 + .../storage/azure-blob-storage/CMakeLists.txt | 11 + .../azure-blob-storage/test/CMakeLists.txt | 11 + .../test/test_azure_blob_chunk_manager.cpp | 11 + internal/core/unittest/bench/bench_search.cpp | 9 +- internal/core/unittest/test_array.cpp | 49 +- internal/core/unittest/test_array_expr.cpp | 38 +- internal/core/unittest/test_binlog_index.cpp | 7 +- internal/core/unittest/test_c_api.cpp | 173 +- internal/core/unittest/test_float16.cpp | 4 +- internal/core/unittest/test_growing_index.cpp | 7 +- internal/core/unittest/test_query.cpp | 36 +- internal/core/unittest/test_sealed.cpp | 63 +- internal/core/unittest/test_string_expr.cpp | 2 +- internal/core/unittest/test_utils.cpp | 19 +- internal/proto/internal.proto | 4 +- ...emove time travel ralted testcase (#26119) | 2132 +++++++++++++++++ internal/proxy/lb_policy.go | 2 +- internal/proxy/lb_policy_test.go | 18 +- internal/proxy/task_delete.go | 6 +- internal/proxy/task_delete_test.go | 16 +- internal/proxy/task_query.go | 22 +- internal/proxy/task_search.go | 39 +- internal/proxy/task_search_test.go | 6 +- internal/proxy/task_statistic.go | 8 +- internal/querynodev2/delegator/delegator.go | 34 +- internal/querynodev2/handlers.go | 1 - internal/querynodev2/segments/plan.go | 2 + internal/querynodev2/segments/reduce_test.go | 2 + internal/querynodev2/segments/result.go | 8 +- internal/querynodev2/segments/segment.go | 1 + internal/querynodev2/services.go | 14 +- internal/querynodev2/services_test.go | 1 + internal/querynodev2/tasks/task.go | 8 + 38 files changed, 2568 insertions(+), 222 deletions(-) create mode 100644 internal/proto/internalpb/internal.pb.go~parent of ca1349708... Remove time travel ralted testcase (#26119) diff --git a/internal/core/src/common/Channel.h b/internal/core/src/common/Channel.h index ebede16c28..f042945432 100644 --- a/internal/core/src/common/Channel.h +++ b/internal/core/src/common/Channel.h @@ -1,3 +1,14 @@ +// Copyright (C) 2019-2020 Zilliz. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License +// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +// or implied. See the License for the specific language governing permissions and limitations under the License + #include #include diff --git a/internal/core/src/segcore/SegmentInterface.cpp b/internal/core/src/segcore/SegmentInterface.cpp index 897c3c6f5a..afdececcd8 100644 --- a/internal/core/src/segcore/SegmentInterface.cpp +++ b/internal/core/src/segcore/SegmentInterface.cpp @@ -67,11 +67,12 @@ SegmentInternalInterface::FillTargetEntry(const query::Plan* plan, std::unique_ptr SegmentInternalInterface::Search( const query::Plan* plan, - const query::PlaceholderGroup* placeholder_group) const { + const query::PlaceholderGroup* placeholder_group, + Timestamp timestamp) const { std::shared_lock lck(mutex_); milvus::tracer::AddEvent("obtained_segment_lock_mutex"); check_search(plan); - query::ExecPlanNodeVisitor visitor(*this, 1L << 63, placeholder_group); + query::ExecPlanNodeVisitor visitor(*this, timestamp, placeholder_group); auto results = std::make_unique(); *results = visitor.get_moved_result(*plan->plan_node_); results->segment_ = (void*)this; diff --git a/internal/core/src/segcore/SegmentInterface.h b/internal/core/src/segcore/SegmentInterface.h index dbff0fba9b..b9d716bac4 100644 --- a/internal/core/src/segcore/SegmentInterface.h +++ b/internal/core/src/segcore/SegmentInterface.h @@ -52,7 +52,8 @@ class SegmentInterface { virtual std::unique_ptr Search(const query::Plan* Plan, - const query::PlaceholderGroup* placeholder_group) const = 0; + const query::PlaceholderGroup* placeholder_group, + Timestamp timestamp) const = 0; virtual std::unique_ptr Retrieve(const query::RetrievePlan* Plan, @@ -131,7 +132,8 @@ class SegmentInternalInterface : public SegmentInterface { std::unique_ptr Search(const query::Plan* Plan, - const query::PlaceholderGroup* placeholder_group) const override; + const query::PlaceholderGroup* placeholder_group, + Timestamp timestamp) const override; void FillPrimaryKeys(const query::Plan* plan, diff --git a/internal/core/src/segcore/segment_c.cpp b/internal/core/src/segcore/segment_c.cpp index 4fb444fc97..75fc834590 100644 --- a/internal/core/src/segcore/segment_c.cpp +++ b/internal/core/src/segcore/segment_c.cpp @@ -78,6 +78,7 @@ Search(CSegmentInterface c_segment, CSearchPlan c_plan, CPlaceholderGroup c_placeholder_group, CTraceContext c_trace, + uint64_t timestamp, CSearchResult* result) { try { auto segment = (milvus::segcore::SegmentInterface*)c_segment; @@ -88,7 +89,7 @@ Search(CSegmentInterface c_segment, c_trace.traceID, c_trace.spanID, c_trace.flag}; auto span = milvus::tracer::StartSpan("SegCoreSearch", &ctx); milvus::tracer::SetRootSpan(span); - auto search_result = segment->Search(plan, phg_ptr); + auto search_result = segment->Search(plan, phg_ptr, timestamp); if (!milvus::PositivelyRelated( plan->plan_node_->search_info_.metric_type_)) { for (auto& dis : search_result->distances_) { diff --git a/internal/core/src/segcore/segment_c.h b/internal/core/src/segcore/segment_c.h index d4d0a641e8..eac94fbb1b 100644 --- a/internal/core/src/segcore/segment_c.h +++ b/internal/core/src/segcore/segment_c.h @@ -45,6 +45,7 @@ Search(CSegmentInterface c_segment, CSearchPlan c_plan, CPlaceholderGroup c_placeholder_group, CTraceContext c_trace, + uint64_t timestamp, CSearchResult* result); void diff --git a/internal/core/src/storage/azure-blob-storage/CMakeLists.txt b/internal/core/src/storage/azure-blob-storage/CMakeLists.txt index 7f27d58385..62b2e971c8 100644 --- a/internal/core/src/storage/azure-blob-storage/CMakeLists.txt +++ b/internal/core/src/storage/azure-blob-storage/CMakeLists.txt @@ -1,3 +1,14 @@ +# Copyright (C) 2019-2020 Zilliz. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed under the License +# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +# or implied. See the License for the specific language governing permissions and limitations under the License + # Copyright (c) Microsoft Corporation. All rights reserved. # SPDX-License-Identifier: MIT diff --git a/internal/core/src/storage/azure-blob-storage/test/CMakeLists.txt b/internal/core/src/storage/azure-blob-storage/test/CMakeLists.txt index 563fcfd6a7..28e7cff422 100644 --- a/internal/core/src/storage/azure-blob-storage/test/CMakeLists.txt +++ b/internal/core/src/storage/azure-blob-storage/test/CMakeLists.txt @@ -1,3 +1,14 @@ +# Copyright (C) 2019-2020 Zilliz. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed under the License +# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +# or implied. See the License for the specific language governing permissions and limitations under the License + # Copyright (c) Microsoft Corporation. All rights reserved. # SPDX-License-Identifier: MIT diff --git a/internal/core/src/storage/azure-blob-storage/test/test_azure_blob_chunk_manager.cpp b/internal/core/src/storage/azure-blob-storage/test/test_azure_blob_chunk_manager.cpp index 79dcb55fa3..2f377eff03 100644 --- a/internal/core/src/storage/azure-blob-storage/test/test_azure_blob_chunk_manager.cpp +++ b/internal/core/src/storage/azure-blob-storage/test/test_azure_blob_chunk_manager.cpp @@ -1,3 +1,14 @@ +// Copyright (C) 2019-2020 Zilliz. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License +// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +// or implied. See the License for the specific language governing permissions and limitations under the License + #include "../AzureBlobChunkManager.h" #include #include diff --git a/internal/core/unittest/bench/bench_search.cpp b/internal/core/unittest/bench/bench_search.cpp index 9f63d61ed6..114a62ff97 100644 --- a/internal/core/unittest/bench/bench_search.cpp +++ b/internal/core/unittest/bench/bench_search.cpp @@ -90,8 +90,10 @@ Search_GrowingIndex(benchmark::State& state) { dataset_.timestamps_.data(), dataset_.raw_); + Timestamp ts = 10000000; + for (auto _ : state) { - auto qr = segment->Search(plan.get(), ph_group.get()); + auto qr = segment->Search(plan.get(), ph_group.get(), ts); } } @@ -123,8 +125,11 @@ Search_Sealed(benchmark::State& state) { segment->DropFieldData(milvus::FieldId(100)); segment->LoadIndex(info); } + + Timestamp ts = 10000000; + for (auto _ : state) { - auto qr = segment->Search(plan.get(), ph_group.get()); + auto qr = segment->Search(plan.get(), ph_group.get(), ts); } } diff --git a/internal/core/unittest/test_array.cpp b/internal/core/unittest/test_array.cpp index 7df6cc011b..a02f2f5963 100644 --- a/internal/core/unittest/test_array.cpp +++ b/internal/core/unittest/test_array.cpp @@ -32,10 +32,9 @@ TEST(Array, TestConstructArray) { ASSERT_EQ(int_array.get_data(i), i); } ASSERT_TRUE(int_array.is_same_array(field_int_array)); - auto int_array_tmp = Array( - const_cast(int_array.data()), - int_array.byte_size(), - int_array.get_element_type(), + auto int_array_tmp = Array(const_cast(int_array.data()), + int_array.byte_size(), + int_array.get_element_type(), {}); ASSERT_TRUE(int_array_tmp == int_array); auto int_8_array = Array(const_cast(int_array.data()), @@ -48,10 +47,9 @@ TEST(Array, TestConstructArray) { DataType::INT16, {}); ASSERT_EQ(int_array.length(), int_16_array.length()); - auto int_array_view = ArrayView( - const_cast(int_array.data()), - int_array.byte_size(), - int_array.get_element_type(), + auto int_array_view = ArrayView(const_cast(int_array.data()), + int_array.byte_size(), + int_array.get_element_type(), {}); ASSERT_EQ(int_array.length(), int_array_view.length()); ASSERT_EQ(int_array.byte_size(), int_array_view.byte_size()); @@ -76,10 +74,9 @@ TEST(Array, TestConstructArray) { long_array.get_element_type(), {}); ASSERT_TRUE(long_array_tmp == long_array); - auto long_array_view = ArrayView( - const_cast(long_array.data()), - long_array.byte_size(), - long_array.get_element_type(), + auto long_array_view = ArrayView(const_cast(long_array.data()), + long_array.byte_size(), + long_array.get_element_type(), {}); ASSERT_EQ(long_array.length(), long_array_view.length()); ASSERT_EQ(long_array.byte_size(), long_array_view.byte_size()); @@ -114,10 +111,9 @@ TEST(Array, TestConstructArray) { string_array.get_element_type(), std::move(string_element_offsets)); ASSERT_TRUE(string_array_tmp == string_array); - auto string_array_view = ArrayView( - const_cast(string_array.data()), - string_array.byte_size(), - string_array.get_element_type(), + auto string_array_view = ArrayView(const_cast(string_array.data()), + string_array.byte_size(), + string_array.get_element_type(), std::move(string_view_element_offsets)); ASSERT_EQ(string_array.length(), string_array_view.length()); ASSERT_EQ(string_array.byte_size(), string_array_view.byte_size()); @@ -143,10 +139,9 @@ TEST(Array, TestConstructArray) { bool_array.get_element_type(), {}); ASSERT_TRUE(bool_array_tmp == bool_array); - auto bool_array_view = ArrayView( - const_cast(bool_array.data()), - bool_array.byte_size(), - bool_array.get_element_type(), + auto bool_array_view = ArrayView(const_cast(bool_array.data()), + bool_array.byte_size(), + bool_array.get_element_type(), {}); ASSERT_EQ(bool_array.length(), bool_array_view.length()); ASSERT_EQ(bool_array.byte_size(), bool_array_view.byte_size()); @@ -172,10 +167,9 @@ TEST(Array, TestConstructArray) { float_array.get_element_type(), {}); ASSERT_TRUE(float_array_tmp == float_array); - auto float_array_view = ArrayView( - const_cast(float_array.data()), - float_array.byte_size(), - float_array.get_element_type(), + auto float_array_view = ArrayView(const_cast(float_array.data()), + float_array.byte_size(), + float_array.get_element_type(), {}); ASSERT_EQ(float_array.length(), float_array_view.length()); ASSERT_EQ(float_array.byte_size(), float_array_view.byte_size()); @@ -202,10 +196,9 @@ TEST(Array, TestConstructArray) { double_array.get_element_type(), {}); ASSERT_TRUE(double_array_tmp == double_array); - auto double_array_view = ArrayView( - const_cast(double_array.data()), - double_array.byte_size(), - double_array.get_element_type(), + auto double_array_view = ArrayView(const_cast(double_array.data()), + double_array.byte_size(), + double_array.get_element_type(), {}); ASSERT_EQ(double_array.length(), double_array_view.length()); ASSERT_EQ(double_array.byte_size(), double_array_view.byte_size()); diff --git a/internal/core/unittest/test_array_expr.cpp b/internal/core/unittest/test_array_expr.cpp index 89798a4417..92ef8f44c5 100644 --- a/internal/core/unittest/test_array_expr.cpp +++ b/internal/core/unittest/test_array_expr.cpp @@ -894,7 +894,7 @@ TEST(Expr, TestArrayContains) { *seg_promote, seg_promote->get_row_count(), MAX_TIMESTAMP); std::vector> bool_testcases{{{true, true}, {}}, - {{false, false}, {}}}; + {{false, false}, {}}}; for (auto testcase : bool_testcases) { auto check = [&](const std::vector& values) { @@ -1652,9 +1652,7 @@ TEST(Expr, TestArrayBinaryArith) { value: >)", "int", - [](milvus::Array& array) { - return array.length() == 10; - }}, + [](milvus::Array& array) { return array.length() == 10; }}, {R"(binary_arith_op_eval_range_expr: < column_info: < field_id: 101 @@ -1667,9 +1665,7 @@ TEST(Expr, TestArrayBinaryArith) { value: >)", "int", - [](milvus::Array& array) { - return array.length() != 8; - }}, + [](milvus::Array& array) { return array.length() != 8; }}, }; std::string raw_plan_tmp = R"(vector_anns: < @@ -1847,7 +1843,7 @@ TEST(Expr, TestArrayInTerm) { ExecExprVisitor visitor( *seg_promote, seg_promote->get_row_count(), MAX_TIMESTAMP); - std::vector>> testcases = { @@ -1860,11 +1856,11 @@ TEST(Expr, TestArrayInTerm) { > values: values: values: >)", - "long", - [](milvus::Array& array) { - auto val = array.get_data(0); - return val == 1 || val ==2 || val == 3; - }}, + "long", + [](milvus::Array& array) { + auto val = array.get_data(0); + return val == 1 || val == 2 || val == 3; + }}, {R"(term_expr: < column_info: < field_id: 101 @@ -1874,9 +1870,7 @@ TEST(Expr, TestArrayInTerm) { > >)", "long", - [](milvus::Array& array) { - return false; - }}, + [](milvus::Array& array) { return false; }}, {R"(term_expr: < column_info: < field_id: 102 @@ -1900,9 +1894,7 @@ TEST(Expr, TestArrayInTerm) { > >)", "bool", - [](milvus::Array& array) { - return false; - }}, + [](milvus::Array& array) { return false; }}, {R"(term_expr: < column_info: < field_id: 103 @@ -1926,9 +1918,7 @@ TEST(Expr, TestArrayInTerm) { > >)", "float", - [](milvus::Array& array) { - return false; - }}, + [](milvus::Array& array) { return false; }}, {R"(term_expr: < column_info: < field_id: 104 @@ -1952,9 +1942,7 @@ TEST(Expr, TestArrayInTerm) { > >)", "string", - [](milvus::Array& array) { - return false; - }}, + [](milvus::Array& array) { return false; }}, {R"(term_expr: < column_info: < field_id: 104 diff --git a/internal/core/unittest/test_binlog_index.cpp b/internal/core/unittest/test_binlog_index.cpp index cb05d47527..0cefe2f8a8 100644 --- a/internal/core/unittest/test_binlog_index.cpp +++ b/internal/core/unittest/test_binlog_index.cpp @@ -196,7 +196,8 @@ TEST_P(BinlogIndexTest, Accuracy) { std::vector ph_group_arr = { ph_group.get()}; auto nlist = segcore_config.get_nlist(); - auto binlog_index_sr = segment->Search(plan.get(), ph_group.get()); + auto binlog_index_sr = + segment->Search(plan.get(), ph_group.get(), 1L << 63); ASSERT_EQ(binlog_index_sr->total_nq_, num_queries); EXPECT_EQ(binlog_index_sr->unity_topK_, topk); EXPECT_EQ(binlog_index_sr->distances_.size(), num_queries * topk); @@ -231,7 +232,7 @@ TEST_P(BinlogIndexTest, Accuracy) { EXPECT_TRUE(segment->HasIndex(vec_field_id)); EXPECT_EQ(segment->get_row_count(), data_n); EXPECT_FALSE(segment->HasFieldData(vec_field_id)); - auto ivf_sr = segment->Search(plan.get(), ph_group.get()); + auto ivf_sr = segment->Search(plan.get(), ph_group.get(), 1L << 63); auto similary = GetKnnSearchRecall(num_queries, binlog_index_sr->seg_offsets_.data(), topk, @@ -323,4 +324,4 @@ TEST_P(BinlogIndexTest, LoadBinlogWithoutIndexMeta) { EXPECT_FALSE(segment->HasIndex(vec_field_id)); EXPECT_EQ(segment->get_row_count(), data_n); EXPECT_TRUE(segment->HasFieldData(vec_field_id)); -} \ No newline at end of file +} diff --git a/internal/core/unittest/test_c_api.cpp b/internal/core/unittest/test_c_api.cpp index 4893768ea1..d8fcd0f03c 100644 --- a/internal/core/unittest/test_c_api.cpp +++ b/internal/core/unittest/test_c_api.cpp @@ -298,7 +298,7 @@ TEST(CApiTest, SegmentTest) { ASSERT_NE(status.error_code, Success); DeleteCollection(collection); DeleteSegment(segment); - free((char *)status.error_msg); + free((char*)status.error_msg); } TEST(CApiTest, CPlan) { @@ -1009,11 +1009,13 @@ TEST(CApiTest, SearchTest) { placeholderGroups.push_back(placeholderGroup); CSearchResult search_result; - auto res = Search(segment, plan, placeholderGroup, {}, &search_result); + auto res = + Search(segment, plan, placeholderGroup, {}, ts_offset, &search_result); ASSERT_EQ(res.error_code, Success); CSearchResult search_result2; - auto res2 = Search(segment, plan, placeholderGroup, {}, &search_result2); + auto res2 = + Search(segment, plan, placeholderGroup, {}, ts_offset, &search_result2); ASSERT_EQ(res2.error_code, Success); DeleteSearchPlan(plan); @@ -1077,7 +1079,12 @@ TEST(CApiTest, SearchTestWithExpr) { dataset.timestamps_.push_back(1); CSearchResult search_result; - auto res = Search(segment, plan, placeholderGroup, {}, &search_result); + auto res = Search(segment, + plan, + placeholderGroup, + {}, + dataset.timestamps_[0], + &search_result); ASSERT_EQ(res.error_code, Success); DeleteSearchPlan(plan); @@ -1355,7 +1362,7 @@ TEST(CApiTest, ReudceNullResult) { auto slice_topKs = std::vector{1}; std::vector results; CSearchResult res; - status = Search(segment, plan, placeholderGroup, {}, &res); + status = Search(segment, plan, placeholderGroup, {}, 1L << 63, &res); ASSERT_EQ(status.error_code, Success); results.push_back(res); CSearchResultDataBlobs cSearchResultData; @@ -1442,9 +1449,11 @@ TEST(CApiTest, ReduceRemoveDuplicates) { auto slice_topKs = std::vector{topK / 2, topK}; std::vector results; CSearchResult res1, res2; - status = Search(segment, plan, placeholderGroup, {}, &res1); + status = Search( + segment, plan, placeholderGroup, {}, dataset.timestamps_[0], &res1); ASSERT_EQ(status.error_code, Success); - status = Search(segment, plan, placeholderGroup, {}, &res2); + status = Search( + segment, plan, placeholderGroup, {}, dataset.timestamps_[0], &res2); ASSERT_EQ(status.error_code, Success); results.push_back(res1); results.push_back(res2); @@ -1473,11 +1482,14 @@ TEST(CApiTest, ReduceRemoveDuplicates) { auto slice_topKs = std::vector{topK / 2, topK, topK}; std::vector results; CSearchResult res1, res2, res3; - status = Search(segment, plan, placeholderGroup, {}, &res1); + status = Search( + segment, plan, placeholderGroup, {}, dataset.timestamps_[0], &res1); ASSERT_EQ(status.error_code, Success); - status = Search(segment, plan, placeholderGroup, {}, &res2); + status = Search( + segment, plan, placeholderGroup, {}, dataset.timestamps_[0], &res2); ASSERT_EQ(status.error_code, Success); - status = Search(segment, plan, placeholderGroup, {}, &res3); + status = Search( + segment, plan, placeholderGroup, {}, dataset.timestamps_[0], &res3); ASSERT_EQ(status.error_code, Success); results.push_back(res1); results.push_back(res2); @@ -1566,9 +1578,11 @@ testReduceSearchWithExpr(int N, int topK, int num_queries) { std::vector results; CSearchResult res1; CSearchResult res2; - auto res = Search(segment, plan, placeholderGroup, {}, &res1); + auto res = Search( + segment, plan, placeholderGroup, {}, dataset.timestamps_[N - 1], &res1); ASSERT_EQ(res.error_code, Success); - res = Search(segment, plan, placeholderGroup, {}, &res2); + res = Search( + segment, plan, placeholderGroup, {}, dataset.timestamps_[N - 1], &res2); ASSERT_EQ(res.error_code, Success); results.push_back(res1); results.push_back(res2); @@ -1792,9 +1806,15 @@ TEST(CApiTest, Indexing_Without_Predicate) { std::vector placeholderGroups; placeholderGroups.push_back(placeholderGroup); + Timestamp timestmap = 10000000; + CSearchResult c_search_result_on_smallIndex; - auto res_before_load_index = Search( - segment, plan, placeholderGroup, {}, &c_search_result_on_smallIndex); + auto res_before_load_index = Search(segment, + plan, + placeholderGroup, + {}, + timestmap, + &c_search_result_on_smallIndex); ASSERT_EQ(res_before_load_index.error_code, Success); // load index to segment @@ -1854,6 +1874,7 @@ TEST(CApiTest, Indexing_Without_Predicate) { plan, placeholderGroup, {}, + timestmap, &c_search_result_on_bigIndex); ASSERT_EQ(res_after_load_index.error_code, Success); @@ -1936,9 +1957,15 @@ TEST(CApiTest, Indexing_Expr_Without_Predicate) { std::vector placeholderGroups; placeholderGroups.push_back(placeholderGroup); + Timestamp timestamp = 10000000; + CSearchResult c_search_result_on_smallIndex; - auto res_before_load_index = Search( - segment, plan, placeholderGroup, {}, &c_search_result_on_smallIndex); + auto res_before_load_index = Search(segment, + plan, + placeholderGroup, + {}, + timestamp, + &c_search_result_on_smallIndex); ASSERT_EQ(res_before_load_index.error_code, Success); // load index to segment @@ -1999,6 +2026,7 @@ TEST(CApiTest, Indexing_Expr_Without_Predicate) { plan, placeholderGroup, {}, + timestamp, &c_search_result_on_bigIndex); ASSERT_EQ(res_after_load_index.error_code, Success); @@ -2109,10 +2137,15 @@ TEST(CApiTest, Indexing_With_float_Predicate_Range) { std::vector placeholderGroups; placeholderGroups.push_back(placeholderGroup); + Timestamp timestamp = 10000000; CSearchResult c_search_result_on_smallIndex; - auto res_before_load_index = Search( - segment, plan, placeholderGroup, {}, &c_search_result_on_smallIndex); + auto res_before_load_index = Search(segment, + plan, + placeholderGroup, + {}, + timestamp, + &c_search_result_on_smallIndex); ASSERT_EQ(res_before_load_index.error_code, Success); // load index to segment @@ -2173,6 +2206,7 @@ TEST(CApiTest, Indexing_With_float_Predicate_Range) { plan, placeholderGroup, {}, + timestamp, &c_search_result_on_bigIndex); ASSERT_EQ(res_after_load_index.error_code, Success); @@ -2201,7 +2235,7 @@ TEST(CApiTest, Indexing_Expr_With_float_Predicate_Range) { generate_collection_schema(knowhere::metric::L2, DIM, false); auto collection = NewCollection(schema_string.c_str()); auto schema = ((segcore::Collection*)collection)->get_schema(); - CSegmentInterface segment; + CSegmentInterface segment; auto status = NewSegment(collection, Growing, -1, &segment); ASSERT_EQ(status.error_code, Success); @@ -2285,10 +2319,15 @@ TEST(CApiTest, Indexing_Expr_With_float_Predicate_Range) { std::vector placeholderGroups; placeholderGroups.push_back(placeholderGroup); + Timestamp timestamp = 10000000; CSearchResult c_search_result_on_smallIndex; - auto res_before_load_index = Search( - segment, plan, placeholderGroup, {}, &c_search_result_on_smallIndex); + auto res_before_load_index = Search(segment, + plan, + placeholderGroup, + {}, + timestamp, + &c_search_result_on_smallIndex); ASSERT_EQ(res_before_load_index.error_code, Success); // load index to segment @@ -2349,6 +2388,7 @@ TEST(CApiTest, Indexing_Expr_With_float_Predicate_Range) { plan, placeholderGroup, {}, + timestamp, &c_search_result_on_bigIndex); ASSERT_EQ(res_after_load_index.error_code, Success); @@ -2453,10 +2493,15 @@ TEST(CApiTest, Indexing_With_float_Predicate_Term) { std::vector placeholderGroups; placeholderGroups.push_back(placeholderGroup); + Timestamp timestamp = 10000000; CSearchResult c_search_result_on_smallIndex; - auto res_before_load_index = Search( - segment, plan, placeholderGroup, {}, &c_search_result_on_smallIndex); + auto res_before_load_index = Search(segment, + plan, + placeholderGroup, + {}, + timestamp, + &c_search_result_on_smallIndex); ASSERT_EQ(res_before_load_index.error_code, Success); // load index to segment @@ -2517,6 +2562,7 @@ TEST(CApiTest, Indexing_With_float_Predicate_Term) { plan, placeholderGroup, {}, + timestamp, &c_search_result_on_bigIndex); ASSERT_EQ(res_after_load_index.error_code, Success); @@ -2622,10 +2668,15 @@ TEST(CApiTest, Indexing_Expr_With_float_Predicate_Term) { std::vector placeholderGroups; placeholderGroups.push_back(placeholderGroup); + Timestamp timestamp = 10000000; CSearchResult c_search_result_on_smallIndex; - auto res_before_load_index = Search( - segment, plan, placeholderGroup, {}, &c_search_result_on_smallIndex); + auto res_before_load_index = Search(segment, + plan, + placeholderGroup, + {}, + timestamp, + &c_search_result_on_smallIndex); ASSERT_EQ(res_before_load_index.error_code, Success); // load index to segment @@ -2686,6 +2737,7 @@ TEST(CApiTest, Indexing_Expr_With_float_Predicate_Term) { plan, placeholderGroup, {}, + timestamp, &c_search_result_on_bigIndex); ASSERT_EQ(res_after_load_index.error_code, Success); @@ -2796,10 +2848,15 @@ TEST(CApiTest, Indexing_With_binary_Predicate_Range) { std::vector placeholderGroups; placeholderGroups.push_back(placeholderGroup); + Timestamp timestamp = 10000000; CSearchResult c_search_result_on_smallIndex; - auto res_before_load_index = Search( - segment, plan, placeholderGroup, {}, &c_search_result_on_smallIndex); + auto res_before_load_index = Search(segment, + plan, + placeholderGroup, + {}, + timestamp, + &c_search_result_on_smallIndex); ASSERT_EQ(res_before_load_index.error_code, Success); // load index to segment @@ -2861,6 +2918,7 @@ TEST(CApiTest, Indexing_With_binary_Predicate_Range) { plan, placeholderGroup, {}, + timestamp, &c_search_result_on_bigIndex); ASSERT_EQ(res_after_load_index.error_code, Success); @@ -2971,10 +3029,15 @@ TEST(CApiTest, Indexing_Expr_With_binary_Predicate_Range) { std::vector placeholderGroups; placeholderGroups.push_back(placeholderGroup); + Timestamp timestamp = 10000000; CSearchResult c_search_result_on_smallIndex; - auto res_before_load_index = Search( - segment, plan, placeholderGroup, {}, &c_search_result_on_smallIndex); + auto res_before_load_index = Search(segment, + plan, + placeholderGroup, + {}, + timestamp, + &c_search_result_on_smallIndex); ASSERT_TRUE(res_before_load_index.error_code == Success) << res_before_load_index.error_msg; @@ -3036,6 +3099,7 @@ TEST(CApiTest, Indexing_Expr_With_binary_Predicate_Range) { plan, placeholderGroup, {}, + timestamp, &c_search_result_on_bigIndex); ASSERT_EQ(res_after_load_index.error_code, Success); @@ -3141,10 +3205,15 @@ TEST(CApiTest, Indexing_With_binary_Predicate_Term) { std::vector placeholderGroups; placeholderGroups.push_back(placeholderGroup); + Timestamp timestamp = 10000000; CSearchResult c_search_result_on_smallIndex; - auto res_before_load_index = Search( - segment, plan, placeholderGroup, {}, &c_search_result_on_smallIndex); + auto res_before_load_index = Search(segment, + plan, + placeholderGroup, + {}, + timestamp, + &c_search_result_on_smallIndex); ASSERT_EQ(res_before_load_index.error_code, Success); // load index to segment @@ -3205,6 +3274,7 @@ TEST(CApiTest, Indexing_With_binary_Predicate_Term) { plan, placeholderGroup, {}, + timestamp, &c_search_result_on_bigIndex); ASSERT_EQ(res_after_load_index.error_code, Success); @@ -3332,11 +3402,15 @@ TEST(CApiTest, Indexing_Expr_With_binary_Predicate_Term) { std::vector placeholderGroups; placeholderGroups.push_back(placeholderGroup); - Timestamp time = 10000000; + Timestamp timestamp = 10000000; CSearchResult c_search_result_on_smallIndex; - auto res_before_load_index = Search( - segment, plan, placeholderGroup, {}, &c_search_result_on_smallIndex); + auto res_before_load_index = Search(segment, + plan, + placeholderGroup, + {}, + timestamp, + &c_search_result_on_smallIndex); ASSERT_EQ(res_before_load_index.error_code, Success); // load index to segment @@ -3397,6 +3471,7 @@ TEST(CApiTest, Indexing_Expr_With_binary_Predicate_Term) { plan, placeholderGroup, {}, + timestamp, &c_search_result_on_bigIndex); ASSERT_EQ(res_after_load_index.error_code, Success); @@ -3535,7 +3610,7 @@ TEST(CApiTest, SealedSegment_search_float_Predicate_Range) { std::vector placeholderGroups; placeholderGroups.push_back(placeholderGroup); - Timestamp time = 10000000; + Timestamp timestamp = 10000000; // load index to segment auto indexing = generate_index(vec_col.data(), @@ -3594,6 +3669,7 @@ TEST(CApiTest, SealedSegment_search_float_Predicate_Range) { plan, placeholderGroup, {}, + timestamp, &c_search_result_on_bigIndex); ASSERT_EQ(res_after_load_index.error_code, Success); @@ -3672,12 +3748,14 @@ TEST(CApiTest, SealedSegment_search_without_predicates) { std::vector placeholderGroups; placeholderGroups.push_back(placeholderGroup); CSearchResult search_result; - auto res = Search(segment, plan, placeholderGroup, {}, &search_result); + auto res = Search( + segment, plan, placeholderGroup, {}, N + ts_offset, &search_result); std::cout << res.error_msg << std::endl; ASSERT_EQ(res.error_code, Success); CSearchResult search_result2; - auto res2 = Search(segment, plan, placeholderGroup, {}, &search_result2); + auto res2 = Search( + segment, plan, placeholderGroup, {}, N + ts_offset, &search_result2); ASSERT_EQ(res2.error_code, Success); DeleteSearchPlan(plan); @@ -3766,6 +3844,7 @@ TEST(CApiTest, SealedSegment_search_float_With_Expr_Predicate_Range) { std::vector placeholderGroups; placeholderGroups.push_back(placeholderGroup); + Timestamp timestamp = 10000000; // load index to segment auto indexing = generate_index(vec_col.data(), @@ -3825,8 +3904,12 @@ TEST(CApiTest, SealedSegment_search_float_With_Expr_Predicate_Range) { } CSearchResult c_search_result_on_bigIndex; - auto res_after_load_index = Search( - segment, plan, placeholderGroup, {}, &c_search_result_on_bigIndex); + auto res_after_load_index = Search(segment, + plan, + placeholderGroup, + {}, + timestamp, + &c_search_result_on_bigIndex); ASSERT_EQ(res_after_load_index.error_code, Success); auto search_result_on_bigIndex = (SearchResult*)c_search_result_on_bigIndex; @@ -4119,7 +4202,8 @@ TEST(CApiTest, RANGE_SEARCH_WITH_RADIUS_WHEN_IP) { placeholderGroups.push_back(placeholderGroup); CSearchResult search_result; - auto res = Search(segment, plan, placeholderGroup, {}, &search_result); + auto res = + Search(segment, plan, placeholderGroup, {}, ts_offset, &search_result); ASSERT_EQ(res.error_code, Success); DeleteSearchPlan(plan); @@ -4182,7 +4266,8 @@ TEST(CApiTest, RANGE_SEARCH_WITH_RADIUS_AND_RANGE_FILTER_WHEN_IP) { placeholderGroups.push_back(placeholderGroup); CSearchResult search_result; - auto res = Search(segment, plan, placeholderGroup, {}, &search_result); + auto res = + Search(segment, plan, placeholderGroup, {}, ts_offset, &search_result); ASSERT_EQ(res.error_code, Success); DeleteSearchPlan(plan); @@ -4245,7 +4330,8 @@ TEST(CApiTest, RANGE_SEARCH_WITH_RADIUS_WHEN_L2) { placeholderGroups.push_back(placeholderGroup); CSearchResult search_result; - auto res = Search(segment, plan, placeholderGroup, {}, &search_result); + auto res = + Search(segment, plan, placeholderGroup, {}, ts_offset, &search_result); ASSERT_EQ(res.error_code, Success); DeleteSearchPlan(plan); @@ -4308,7 +4394,8 @@ TEST(CApiTest, RANGE_SEARCH_WITH_RADIUS_AND_RANGE_FILTER_WHEN_L2) { placeholderGroups.push_back(placeholderGroup); CSearchResult search_result; - auto res = Search(segment, plan, placeholderGroup, {}, &search_result); + auto res = + Search(segment, plan, placeholderGroup, {}, ts_offset, &search_result); ASSERT_EQ(res.error_code, Success); DeleteSearchPlan(plan); diff --git a/internal/core/unittest/test_float16.cpp b/internal/core/unittest/test_float16.cpp index 9a5fa2a20c..e5bf53cdb5 100644 --- a/internal/core/unittest/test_float16.cpp +++ b/internal/core/unittest/test_float16.cpp @@ -153,7 +153,7 @@ TEST(Float16, ExecWithoutPredicateFlat) { auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); - auto sr = segment->Search(plan.get(), ph_group.get()); + auto sr = segment->Search(plan.get(), ph_group.get(), 1L << 63); int topk = 5; query::Json json = SearchResultToJson(*sr); @@ -411,7 +411,7 @@ TEST(Float16, ExecWithPredicate) { auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); - auto sr = segment->Search(plan.get(), ph_group.get()); + auto sr = segment->Search(plan.get(), ph_group.get(), 1L << 63); int topk = 5; query::Json json = SearchResultToJson(*sr); diff --git a/internal/core/unittest/test_growing_index.cpp b/internal/core/unittest/test_growing_index.cpp index 3666dc7cf0..54f09c4474 100644 --- a/internal/core/unittest/test_growing_index.cpp +++ b/internal/core/unittest/test_growing_index.cpp @@ -101,7 +101,9 @@ TEST(GrowingIndex, Correctness) { *schema, plan_str.data(), plan_str.size()); auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); - auto sr = segment->Search(plan.get(), ph_group.get()); + + Timestamp timestamp = 1000000; + auto sr = segment->Search(plan.get(), ph_group.get(), timestamp); EXPECT_EQ(sr->total_nq_, num_queries); EXPECT_EQ(sr->unity_topK_, top_k); EXPECT_EQ(sr->distances_.size(), num_queries * top_k); @@ -111,7 +113,8 @@ TEST(GrowingIndex, Correctness) { *schema, range_plan_str.data(), range_plan_str.size()); auto range_ph_group = ParsePlaceholderGroup( range_plan.get(), ph_group_raw.SerializeAsString()); - auto range_sr = segment->Search(range_plan.get(), range_ph_group.get()); + auto range_sr = + segment->Search(range_plan.get(), range_ph_group.get(), timestamp); ASSERT_EQ(range_sr->total_nq_, num_queries); EXPECT_EQ(sr->unity_topK_, top_k); EXPECT_EQ(sr->distances_.size(), num_queries * top_k); diff --git a/internal/core/unittest/test_query.cpp b/internal/core/unittest/test_query.cpp index afa6a618b6..c22dcd3b57 100644 --- a/internal/core/unittest/test_query.cpp +++ b/internal/core/unittest/test_query.cpp @@ -128,8 +128,9 @@ TEST(Query, ExecWithPredicateLoader) { auto ph_group_raw = CreatePlaceholderGroup(num_queries, 16, 1024); auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); + Timestamp timestamp = 1000000; - auto sr = segment->Search(plan.get(), ph_group.get()); + auto sr = segment->Search(plan.get(), ph_group.get(), timestamp); query::Json json = SearchResultToJson(*sr); #ifdef __linux__ @@ -212,7 +213,9 @@ TEST(Query, ExecWithPredicateSmallN) { auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); - auto sr = segment->Search(plan.get(), ph_group.get()); + Timestamp timestamp = 1000000; + + auto sr = segment->Search(plan.get(), ph_group.get(), timestamp); query::Json json = SearchResultToJson(*sr); std::cout << json.dump(2); @@ -270,8 +273,9 @@ TEST(Query, ExecWithPredicate) { auto ph_group_raw = CreatePlaceholderGroup(num_queries, 16, 1024); auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); + Timestamp timestamp = 1000000; - auto sr = segment->Search(plan.get(), ph_group.get()); + auto sr = segment->Search(plan.get(), ph_group.get(), timestamp); query::Json json = SearchResultToJson(*sr); #ifdef __linux__ @@ -345,9 +349,9 @@ TEST(Query, ExecTerm) { auto ph_group_raw = CreatePlaceholderGroup(num_queries, 16, 1024); auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); + Timestamp timestamp = 1000000; - auto sr = segment->Search(plan.get(), ph_group.get()); - std::vector> results; + auto sr = segment->Search(plan.get(), ph_group.get(), timestamp); int topk = 5; auto json = SearchResultToJson(*sr); ASSERT_EQ(sr->total_nq_, num_queries); @@ -381,7 +385,8 @@ TEST(Query, ExecEmpty) { auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); - auto sr = segment->Search(plan.get(), ph_group.get()); + Timestamp timestamp = 1000000; + auto sr = segment->Search(plan.get(), ph_group.get(), timestamp); std::cout << SearchResultToJson(*sr); for (auto i : sr->seg_offsets_) { @@ -428,8 +433,8 @@ TEST(Query, ExecWithoutPredicateFlat) { auto ph_group_raw = CreatePlaceholderGroup(num_queries, 16, 1024); auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); - - auto sr = segment->Search(plan.get(), ph_group.get()); + Timestamp timestamp = 1000000; + auto sr = segment->Search(plan.get(), ph_group.get(), timestamp); std::vector> results; auto json = SearchResultToJson(*sr); std::cout << json.dump(2); @@ -471,8 +476,9 @@ TEST(Query, ExecWithoutPredicate) { auto ph_group_raw = CreatePlaceholderGroup(num_queries, 16, 1024); auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); + Timestamp timestamp = 1000000; - auto sr = segment->Search(plan.get(), ph_group.get()); + auto sr = segment->Search(plan.get(), ph_group.get(), timestamp); assert_order(*sr, "l2"); std::vector> results; auto json = SearchResultToJson(*sr); @@ -540,7 +546,9 @@ TEST(Query, InnerProduct) { CreatePlaceholderGroupFromBlob(num_queries, 16, col.data()); auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); - auto sr = segment->Search(plan.get(), ph_group.get()); + + Timestamp ts = N * 2; + auto sr = segment->Search(plan.get(), ph_group.get(), ts); assert_order(*sr, "ip"); } @@ -627,6 +635,8 @@ TEST(Query, FillSegment) { CreateSearchPlanByExpr(*schema, plan_str.data(), plan_str.size()); auto ph_proto = CreatePlaceholderGroup(10, 16, 443); auto ph = ParsePlaceholderGroup(plan.get(), ph_proto.SerializeAsString()); + Timestamp ts = N * 2UL; + auto topk = 5; auto num_queries = 10; @@ -636,7 +646,7 @@ TEST(Query, FillSegment) { schema->get_field_id(FieldName("fakevec"))); plan->target_entries_.push_back( schema->get_field_id(FieldName("the_value"))); - auto result = segment->Search(plan.get(), ph.get()); + auto result = segment->Search(plan.get(), ph.get(), ts); result->result_offsets_.resize(topk * num_queries); segment->FillTargetEntry(plan.get(), *result); segment->FillPrimaryKeys(plan.get(), *result); @@ -740,7 +750,9 @@ TEST(Query, ExecWithPredicateBinary) { num_queries, 512, vec_ptr.data() + 1024 * 512 / 8); auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); - auto sr = segment->Search(plan.get(), ph_group.get()); + + Timestamp timestamp = 1000000; + auto sr = segment->Search(plan.get(), ph_group.get(), timestamp); query::Json json = SearchResultToJson(*sr); std::cout << json.dump(2); diff --git a/internal/core/unittest/test_sealed.cpp b/internal/core/unittest/test_sealed.cpp index 5a6890fef2..b88af88aa9 100644 --- a/internal/core/unittest/test_sealed.cpp +++ b/internal/core/unittest/test_sealed.cpp @@ -80,10 +80,11 @@ TEST(Sealed, without_predicate) { CreatePlaceholderGroupFromBlob(num_queries, 16, query_ptr); auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); + Timestamp timestamp = 1000000; std::vector ph_group_arr = {ph_group.get()}; - auto sr = segment->Search(plan.get(), ph_group.get()); + auto sr = segment->Search(plan.get(), ph_group.get(), timestamp); auto pre_result = SearchResultToJson(*sr); milvus::index::CreateIndexInfo create_index_info; create_index_info.field_type = DataType::VECTOR_FLOAT; @@ -127,7 +128,7 @@ TEST(Sealed, without_predicate) { sealed_segment->DropFieldData(fake_id); sealed_segment->LoadIndex(load_info); - sr = sealed_segment->Search(plan.get(), ph_group.get()); + sr = sealed_segment->Search(plan.get(), ph_group.get(), timestamp); auto post_result = SearchResultToJson(*sr); std::cout << "ref_result" << std::endl; @@ -135,6 +136,9 @@ TEST(Sealed, without_predicate) { std::cout << "post_result" << std::endl; std::cout << post_result.dump(1); // ASSERT_EQ(ref_result.dump(1), post_result.dump(1)); + + sr = sealed_segment->Search(plan.get(), ph_group.get(), 0); + EXPECT_EQ(sr->get_total_result_count(), 0); } TEST(Sealed, with_predicate) { @@ -196,10 +200,11 @@ TEST(Sealed, with_predicate) { CreatePlaceholderGroupFromBlob(num_queries, 16, query_ptr); auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); + Timestamp timestamp = 1000000; std::vector ph_group_arr = {ph_group.get()}; - auto sr = segment->Search(plan.get(), ph_group.get()); + auto sr = segment->Search(plan.get(), ph_group.get(), timestamp); milvus::index::CreateIndexInfo create_index_info; create_index_info.field_type = DataType::VECTOR_FLOAT; create_index_info.metric_type = knowhere::metric::L2; @@ -242,7 +247,7 @@ TEST(Sealed, with_predicate) { sealed_segment->DropFieldData(fake_id); sealed_segment->LoadIndex(load_info); - sr = sealed_segment->Search(plan.get(), ph_group.get()); + sr = sealed_segment->Search(plan.get(), ph_group.get(), timestamp); for (int i = 0; i < num_queries; ++i) { auto offset = i * topK; @@ -303,6 +308,7 @@ TEST(Sealed, with_predicate_filter_all) { CreatePlaceholderGroupFromBlob(num_queries, 16, query_ptr); auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); + Timestamp timestamp = 1000000; std::vector ph_group_arr = {ph_group.get()}; @@ -337,7 +343,7 @@ TEST(Sealed, with_predicate_filter_all) { ivf_sealed_segment->DropFieldData(fake_id); ivf_sealed_segment->LoadIndex(load_info); - auto sr = ivf_sealed_segment->Search(plan.get(), ph_group.get()); + auto sr = ivf_sealed_segment->Search(plan.get(), ph_group.get(), timestamp); EXPECT_EQ(sr->get_total_result_count(), 0); auto hnsw_conf = @@ -371,7 +377,8 @@ TEST(Sealed, with_predicate_filter_all) { hnsw_sealed_segment->DropFieldData(fake_id); hnsw_sealed_segment->LoadIndex(hnsw_load_info); - auto sr2 = hnsw_sealed_segment->Search(plan.get(), ph_group.get()); + auto sr2 = + hnsw_sealed_segment->Search(plan.get(), ph_group.get(), timestamp); EXPECT_EQ(sr2->get_total_result_count(), 0); } @@ -454,7 +461,7 @@ TEST(Sealed, LoadFieldData) { > placeholder_tag: "$0" >)"; - + Timestamp timestamp = 1000000; auto plan_str = translate_text_plan_to_binary_plan(raw_plan); auto plan = CreateSearchPlanByExpr(*schema, plan_str.data(), plan_str.size()); @@ -463,13 +470,13 @@ TEST(Sealed, LoadFieldData) { auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); - ASSERT_ANY_THROW(segment->Search(plan.get(), ph_group.get())); + ASSERT_ANY_THROW(segment->Search(plan.get(), ph_group.get(), timestamp)); SealedLoadFieldData(dataset, *segment); - segment->Search(plan.get(), ph_group.get()); + segment->Search(plan.get(), ph_group.get(), timestamp); segment->DropFieldData(fakevec_id); - ASSERT_ANY_THROW(segment->Search(plan.get(), ph_group.get())); + ASSERT_ANY_THROW(segment->Search(plan.get(), ph_group.get(), timestamp)); LoadIndexInfo vec_info; vec_info.field_id = fakevec_id.get(); @@ -492,12 +499,12 @@ TEST(Sealed, LoadFieldData) { ASSERT_EQ(chunk_span3[i], ref3[i]); } - auto sr = segment->Search(plan.get(), ph_group.get()); + auto sr = segment->Search(plan.get(), ph_group.get(), timestamp); auto json = SearchResultToJson(*sr); std::cout << json.dump(1); segment->DropIndex(fakevec_id); - ASSERT_ANY_THROW(segment->Search(plan.get(), ph_group.get())); + ASSERT_ANY_THROW(segment->Search(plan.get(), ph_group.get(), timestamp)); } TEST(Sealed, LoadFieldDataMmap) { @@ -552,7 +559,7 @@ TEST(Sealed, LoadFieldDataMmap) { > placeholder_tag: "$0" >)"; - + Timestamp timestamp = 1000000; auto plan_str = translate_text_plan_to_binary_plan(raw_plan); auto plan = CreateSearchPlanByExpr(*schema, plan_str.data(), plan_str.size()); @@ -561,13 +568,13 @@ TEST(Sealed, LoadFieldDataMmap) { auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); - ASSERT_ANY_THROW(segment->Search(plan.get(), ph_group.get())); + ASSERT_ANY_THROW(segment->Search(plan.get(), ph_group.get(), timestamp)); SealedLoadFieldData(dataset, *segment, {}, true); - segment->Search(plan.get(), ph_group.get()); + segment->Search(plan.get(), ph_group.get(), timestamp); segment->DropFieldData(fakevec_id); - ASSERT_ANY_THROW(segment->Search(plan.get(), ph_group.get())); + ASSERT_ANY_THROW(segment->Search(plan.get(), ph_group.get(), timestamp)); LoadIndexInfo vec_info; vec_info.field_id = fakevec_id.get(); @@ -590,12 +597,12 @@ TEST(Sealed, LoadFieldDataMmap) { ASSERT_EQ(chunk_span3[i], ref3[i]); } - auto sr = segment->Search(plan.get(), ph_group.get()); + auto sr = segment->Search(plan.get(), ph_group.get(), timestamp); auto json = SearchResultToJson(*sr); std::cout << json.dump(1); segment->DropIndex(fakevec_id); - ASSERT_ANY_THROW(segment->Search(plan.get(), ph_group.get())); + ASSERT_ANY_THROW(segment->Search(plan.get(), ph_group.get(), timestamp)); } TEST(Sealed, LoadScalarIndex) { @@ -670,7 +677,7 @@ TEST(Sealed, LoadScalarIndex) { > placeholder_tag: "$0" >)"; - + Timestamp timestamp = 1000000; auto plan_str = translate_text_plan_to_binary_plan(raw_plan); auto plan = CreateSearchPlanByExpr(*schema, plan_str.data(), plan_str.size()); @@ -732,7 +739,7 @@ TEST(Sealed, LoadScalarIndex) { nothing_index.index = GenScalarIndexing(N, nothing_data.data()); segment->LoadIndex(nothing_index); - auto sr = segment->Search(plan.get(), ph_group.get()); + auto sr = segment->Search(plan.get(), ph_group.get(), timestamp); auto json = SearchResultToJson(*sr); std::cout << json.dump(1); } @@ -781,7 +788,7 @@ TEST(Sealed, Delete) { > placeholder_tag: "$0" >)"; - + Timestamp timestamp = 1000000; auto plan_str = translate_text_plan_to_binary_plan(raw_plan); auto plan = CreateSearchPlanByExpr(*schema, plan_str.data(), plan_str.size()); @@ -790,7 +797,7 @@ TEST(Sealed, Delete) { auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); - ASSERT_ANY_THROW(segment->Search(plan.get(), ph_group.get())); + ASSERT_ANY_THROW(segment->Search(plan.get(), ph_group.get(), timestamp)); SealedLoadFieldData(dataset, *segment); @@ -865,7 +872,7 @@ TEST(Sealed, OverlapDelete) { > placeholder_tag: "$0" >)"; - + Timestamp timestamp = 1000000; auto plan_str = translate_text_plan_to_binary_plan(raw_plan); auto plan = CreateSearchPlanByExpr(*schema, plan_str.data(), plan_str.size()); @@ -874,7 +881,7 @@ TEST(Sealed, OverlapDelete) { auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); - ASSERT_ANY_THROW(segment->Search(plan.get(), ph_group.get())); + ASSERT_ANY_THROW(segment->Search(plan.get(), ph_group.get(), timestamp)); SealedLoadFieldData(dataset, *segment); @@ -992,7 +999,7 @@ TEST(Sealed, BF) { auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); - auto result = segment->Search(plan.get(), ph_group.get()); + auto result = segment->Search(plan.get(), ph_group.get(), MAX_TIMESTAMP); auto ves = SearchResultToVector(*result); // first: offset, second: distance EXPECT_GE(ves[0].first, 0); @@ -1046,7 +1053,7 @@ TEST(Sealed, BF_Overflow) { auto ph_group = ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); - auto result = segment->Search(plan.get(), ph_group.get()); + auto result = segment->Search(plan.get(), ph_group.get(), MAX_TIMESTAMP); auto ves = SearchResultToVector(*result); for (int i = 0; i < num_queries; ++i) { EXPECT_EQ(ves[0].first, -1); @@ -1322,7 +1329,7 @@ TEST(Sealed, LoadArrayFieldData) { ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); SealedLoadFieldData(dataset, *segment); - segment->Search(plan.get(), ph_group.get()); + segment->Search(plan.get(), ph_group.get(), 1L << 63); auto ids_ds = GenRandomIds(N); auto s = dynamic_cast(segment.get()); @@ -1379,7 +1386,7 @@ TEST(Sealed, LoadArrayFieldDataWithMMap) { ParsePlaceholderGroup(plan.get(), ph_group_raw.SerializeAsString()); SealedLoadFieldData(dataset, *segment, {}, true); - segment->Search(plan.get(), ph_group.get()); + segment->Search(plan.get(), ph_group.get(), 1L << 63); } TEST(Sealed, QueryAllFields) { diff --git a/internal/core/unittest/test_string_expr.cpp b/internal/core/unittest/test_string_expr.cpp index 32aa555d5f..4ff68d5a49 100644 --- a/internal/core/unittest/test_string_expr.cpp +++ b/internal/core/unittest/test_string_expr.cpp @@ -714,7 +714,7 @@ TEST(AlwaysTrueStringPlan, SearchWithOutputFields) { auto sub_result = BruteForceSearch( search_dataset, vec_col.data(), N, knowhere::Json(), nullptr); - auto sr = segment->Search(plan.get(), ph_group.get()); + auto sr = segment->Search(plan.get(), ph_group.get(), MAX_TIMESTAMP); segment->FillPrimaryKeys(plan.get(), *sr); segment->FillTargetEntry(plan.get(), *sr); ASSERT_EQ(sr->pk_type_, DataType::VARCHAR); diff --git a/internal/core/unittest/test_utils.cpp b/internal/core/unittest/test_utils.cpp index 60a31a20e1..72c73d365f 100644 --- a/internal/core/unittest/test_utils.cpp +++ b/internal/core/unittest/test_utils.cpp @@ -144,13 +144,16 @@ struct TmpFileWrapper { std::string filename; TmpFileWrapper(const std::string& _filename) : filename{_filename} { - fd = open( - filename.c_str(), O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR | S_IXUSR); + fd = open(filename.c_str(), + O_RDWR | O_CREAT | O_EXCL, + S_IRUSR | S_IWUSR | S_IXUSR); } TmpFileWrapper(const TmpFileWrapper&) = delete; TmpFileWrapper(TmpFileWrapper&&) = delete; - TmpFileWrapper& operator =(const TmpFileWrapper&) = delete; - TmpFileWrapper& operator =(TmpFileWrapper&&) = delete; + TmpFileWrapper& + operator=(const TmpFileWrapper&) = delete; + TmpFileWrapper& + operator=(TmpFileWrapper&&) = delete; ~TmpFileWrapper() { if (fd != -1) { close(fd); @@ -181,8 +184,8 @@ TEST(Util, read_from_fd) { tmp_file.fd, read_buf.get(), data_size * max_loop)); // On Linux, read() (and similar system calls) will transfer at most 0x7ffff000 (2,147,479,552) bytes once - EXPECT_THROW(milvus::index::ReadDataFromFD( - tmp_file.fd, read_buf.get(), data_size * max_loop, INT_MAX), - milvus::SegcoreError); + EXPECT_THROW( + milvus::index::ReadDataFromFD( + tmp_file.fd, read_buf.get(), data_size * max_loop, INT_MAX), + milvus::SegcoreError); } - diff --git a/internal/proto/internal.proto b/internal/proto/internal.proto index 9f768a7796..a3cee9652f 100644 --- a/internal/proto/internal.proto +++ b/internal/proto/internal.proto @@ -94,6 +94,7 @@ message SearchRequest { common.DslType dsl_type = 8; bytes serialized_expr_plan = 9; repeated int64 output_fields_id = 10; + uint64 mvcc_timestamp = 11; uint64 guarantee_timestamp = 12; uint64 timeout_timestamp = 13; int64 nq = 14; @@ -120,6 +121,7 @@ message SearchResults { // search request cost CostAggregation costAggregation = 13; + map channels_mvcc = 14; } message CostAggregation { @@ -160,7 +162,7 @@ message RetrieveResults { repeated int64 global_sealed_segmentIDs = 8; // query request cost - CostAggregation costAggregation = 13; + CostAggregation costAggregation = 13; } message LoadIndex { diff --git a/internal/proto/internalpb/internal.pb.go~parent of ca1349708... Remove time travel ralted testcase (#26119) b/internal/proto/internalpb/internal.pb.go~parent of ca1349708... Remove time travel ralted testcase (#26119) new file mode 100644 index 0000000000..65268d2d6e --- /dev/null +++ b/internal/proto/internalpb/internal.pb.go~parent of ca1349708... Remove time travel ralted testcase (#26119) @@ -0,0 +1,2132 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: internal.proto + +package internalpb + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + commonpb "github.com/milvus-io/milvus-proto/go-api/v2/commonpb" + schemapb "github.com/milvus-io/milvus-proto/go-api/v2/schemapb" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type RateType int32 + +const ( + RateType_DDLCollection RateType = 0 + RateType_DDLPartition RateType = 1 + RateType_DDLIndex RateType = 2 + RateType_DDLFlush RateType = 3 + RateType_DDLCompaction RateType = 4 + RateType_DMLInsert RateType = 5 + RateType_DMLDelete RateType = 6 + RateType_DMLBulkLoad RateType = 7 + RateType_DQLSearch RateType = 8 + RateType_DQLQuery RateType = 9 + RateType_DMLUpsert RateType = 10 +) + +var RateType_name = map[int32]string{ + 0: "DDLCollection", + 1: "DDLPartition", + 2: "DDLIndex", + 3: "DDLFlush", + 4: "DDLCompaction", + 5: "DMLInsert", + 6: "DMLDelete", + 7: "DMLBulkLoad", + 8: "DQLSearch", + 9: "DQLQuery", + 10: "DMLUpsert", +} + +var RateType_value = map[string]int32{ + "DDLCollection": 0, + "DDLPartition": 1, + "DDLIndex": 2, + "DDLFlush": 3, + "DDLCompaction": 4, + "DMLInsert": 5, + "DMLDelete": 6, + "DMLBulkLoad": 7, + "DQLSearch": 8, + "DQLQuery": 9, + "DMLUpsert": 10, +} + +func (x RateType) String() string { + return proto.EnumName(RateType_name, int32(x)) +} + +func (RateType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{0} +} + +type GetTimeTickChannelRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetTimeTickChannelRequest) Reset() { *m = GetTimeTickChannelRequest{} } +func (m *GetTimeTickChannelRequest) String() string { return proto.CompactTextString(m) } +func (*GetTimeTickChannelRequest) ProtoMessage() {} +func (*GetTimeTickChannelRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{0} +} + +func (m *GetTimeTickChannelRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetTimeTickChannelRequest.Unmarshal(m, b) +} +func (m *GetTimeTickChannelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetTimeTickChannelRequest.Marshal(b, m, deterministic) +} +func (m *GetTimeTickChannelRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetTimeTickChannelRequest.Merge(m, src) +} +func (m *GetTimeTickChannelRequest) XXX_Size() int { + return xxx_messageInfo_GetTimeTickChannelRequest.Size(m) +} +func (m *GetTimeTickChannelRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetTimeTickChannelRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetTimeTickChannelRequest proto.InternalMessageInfo + +type GetStatisticsChannelRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetStatisticsChannelRequest) Reset() { *m = GetStatisticsChannelRequest{} } +func (m *GetStatisticsChannelRequest) String() string { return proto.CompactTextString(m) } +func (*GetStatisticsChannelRequest) ProtoMessage() {} +func (*GetStatisticsChannelRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{1} +} + +func (m *GetStatisticsChannelRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetStatisticsChannelRequest.Unmarshal(m, b) +} +func (m *GetStatisticsChannelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetStatisticsChannelRequest.Marshal(b, m, deterministic) +} +func (m *GetStatisticsChannelRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetStatisticsChannelRequest.Merge(m, src) +} +func (m *GetStatisticsChannelRequest) XXX_Size() int { + return xxx_messageInfo_GetStatisticsChannelRequest.Size(m) +} +func (m *GetStatisticsChannelRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetStatisticsChannelRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetStatisticsChannelRequest proto.InternalMessageInfo + +type GetDdChannelRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetDdChannelRequest) Reset() { *m = GetDdChannelRequest{} } +func (m *GetDdChannelRequest) String() string { return proto.CompactTextString(m) } +func (*GetDdChannelRequest) ProtoMessage() {} +func (*GetDdChannelRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{2} +} + +func (m *GetDdChannelRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetDdChannelRequest.Unmarshal(m, b) +} +func (m *GetDdChannelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetDdChannelRequest.Marshal(b, m, deterministic) +} +func (m *GetDdChannelRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetDdChannelRequest.Merge(m, src) +} +func (m *GetDdChannelRequest) XXX_Size() int { + return xxx_messageInfo_GetDdChannelRequest.Size(m) +} +func (m *GetDdChannelRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetDdChannelRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetDdChannelRequest proto.InternalMessageInfo + +type NodeInfo struct { + Address *commonpb.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NodeInfo) Reset() { *m = NodeInfo{} } +func (m *NodeInfo) String() string { return proto.CompactTextString(m) } +func (*NodeInfo) ProtoMessage() {} +func (*NodeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{3} +} + +func (m *NodeInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NodeInfo.Unmarshal(m, b) +} +func (m *NodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NodeInfo.Marshal(b, m, deterministic) +} +func (m *NodeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeInfo.Merge(m, src) +} +func (m *NodeInfo) XXX_Size() int { + return xxx_messageInfo_NodeInfo.Size(m) +} +func (m *NodeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_NodeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_NodeInfo proto.InternalMessageInfo + +func (m *NodeInfo) GetAddress() *commonpb.Address { + if m != nil { + return m.Address + } + return nil +} + +func (m *NodeInfo) GetRole() string { + if m != nil { + return m.Role + } + return "" +} + +type InitParams struct { + NodeID int64 `protobuf:"varint,1,opt,name=nodeID,proto3" json:"nodeID,omitempty"` + StartParams []*commonpb.KeyValuePair `protobuf:"bytes,2,rep,name=start_params,json=startParams,proto3" json:"start_params,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *InitParams) Reset() { *m = InitParams{} } +func (m *InitParams) String() string { return proto.CompactTextString(m) } +func (*InitParams) ProtoMessage() {} +func (*InitParams) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{4} +} + +func (m *InitParams) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InitParams.Unmarshal(m, b) +} +func (m *InitParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InitParams.Marshal(b, m, deterministic) +} +func (m *InitParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_InitParams.Merge(m, src) +} +func (m *InitParams) XXX_Size() int { + return xxx_messageInfo_InitParams.Size(m) +} +func (m *InitParams) XXX_DiscardUnknown() { + xxx_messageInfo_InitParams.DiscardUnknown(m) +} + +var xxx_messageInfo_InitParams proto.InternalMessageInfo + +func (m *InitParams) GetNodeID() int64 { + if m != nil { + return m.NodeID + } + return 0 +} + +func (m *InitParams) GetStartParams() []*commonpb.KeyValuePair { + if m != nil { + return m.StartParams + } + return nil +} + +type StringList struct { + Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` + Status *commonpb.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StringList) Reset() { *m = StringList{} } +func (m *StringList) String() string { return proto.CompactTextString(m) } +func (*StringList) ProtoMessage() {} +func (*StringList) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{5} +} + +func (m *StringList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StringList.Unmarshal(m, b) +} +func (m *StringList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StringList.Marshal(b, m, deterministic) +} +func (m *StringList) XXX_Merge(src proto.Message) { + xxx_messageInfo_StringList.Merge(m, src) +} +func (m *StringList) XXX_Size() int { + return xxx_messageInfo_StringList.Size(m) +} +func (m *StringList) XXX_DiscardUnknown() { + xxx_messageInfo_StringList.DiscardUnknown(m) +} + +var xxx_messageInfo_StringList proto.InternalMessageInfo + +func (m *StringList) GetValues() []string { + if m != nil { + return m.Values + } + return nil +} + +func (m *StringList) GetStatus() *commonpb.Status { + if m != nil { + return m.Status + } + return nil +} + +type GetStatisticsRequest struct { + Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + // Not useful for now + DbID int64 `protobuf:"varint,2,opt,name=dbID,proto3" json:"dbID,omitempty"` + // The collection you want get statistics + CollectionID int64 `protobuf:"varint,3,opt,name=collectionID,proto3" json:"collectionID,omitempty"` + // The partitions you want get statistics + PartitionIDs []int64 `protobuf:"varint,4,rep,packed,name=partitionIDs,proto3" json:"partitionIDs,omitempty"` + // timestamp of the statistics + TravelTimestamp uint64 `protobuf:"varint,5,opt,name=travel_timestamp,json=travelTimestamp,proto3" json:"travel_timestamp,omitempty"` + GuaranteeTimestamp uint64 `protobuf:"varint,6,opt,name=guarantee_timestamp,json=guaranteeTimestamp,proto3" json:"guarantee_timestamp,omitempty"` + TimeoutTimestamp uint64 `protobuf:"varint,7,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetStatisticsRequest) Reset() { *m = GetStatisticsRequest{} } +func (m *GetStatisticsRequest) String() string { return proto.CompactTextString(m) } +func (*GetStatisticsRequest) ProtoMessage() {} +func (*GetStatisticsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{6} +} + +func (m *GetStatisticsRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetStatisticsRequest.Unmarshal(m, b) +} +func (m *GetStatisticsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetStatisticsRequest.Marshal(b, m, deterministic) +} +func (m *GetStatisticsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetStatisticsRequest.Merge(m, src) +} +func (m *GetStatisticsRequest) XXX_Size() int { + return xxx_messageInfo_GetStatisticsRequest.Size(m) +} +func (m *GetStatisticsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetStatisticsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetStatisticsRequest proto.InternalMessageInfo + +func (m *GetStatisticsRequest) GetBase() *commonpb.MsgBase { + if m != nil { + return m.Base + } + return nil +} + +func (m *GetStatisticsRequest) GetDbID() int64 { + if m != nil { + return m.DbID + } + return 0 +} + +func (m *GetStatisticsRequest) GetCollectionID() int64 { + if m != nil { + return m.CollectionID + } + return 0 +} + +func (m *GetStatisticsRequest) GetPartitionIDs() []int64 { + if m != nil { + return m.PartitionIDs + } + return nil +} + +func (m *GetStatisticsRequest) GetTravelTimestamp() uint64 { + if m != nil { + return m.TravelTimestamp + } + return 0 +} + +func (m *GetStatisticsRequest) GetGuaranteeTimestamp() uint64 { + if m != nil { + return m.GuaranteeTimestamp + } + return 0 +} + +func (m *GetStatisticsRequest) GetTimeoutTimestamp() uint64 { + if m != nil { + return m.TimeoutTimestamp + } + return 0 +} + +type GetStatisticsResponse struct { + Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + // Contain error_code and reason + Status *commonpb.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + // Collection statistics data. Contain pairs like {"row_count": "1"} + Stats []*commonpb.KeyValuePair `protobuf:"bytes,3,rep,name=stats,proto3" json:"stats,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetStatisticsResponse) Reset() { *m = GetStatisticsResponse{} } +func (m *GetStatisticsResponse) String() string { return proto.CompactTextString(m) } +func (*GetStatisticsResponse) ProtoMessage() {} +func (*GetStatisticsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{7} +} + +func (m *GetStatisticsResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetStatisticsResponse.Unmarshal(m, b) +} +func (m *GetStatisticsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetStatisticsResponse.Marshal(b, m, deterministic) +} +func (m *GetStatisticsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetStatisticsResponse.Merge(m, src) +} +func (m *GetStatisticsResponse) XXX_Size() int { + return xxx_messageInfo_GetStatisticsResponse.Size(m) +} +func (m *GetStatisticsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetStatisticsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetStatisticsResponse proto.InternalMessageInfo + +func (m *GetStatisticsResponse) GetBase() *commonpb.MsgBase { + if m != nil { + return m.Base + } + return nil +} + +func (m *GetStatisticsResponse) GetStatus() *commonpb.Status { + if m != nil { + return m.Status + } + return nil +} + +func (m *GetStatisticsResponse) GetStats() []*commonpb.KeyValuePair { + if m != nil { + return m.Stats + } + return nil +} + +type CreateAliasRequest struct { + Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` + CollectionName string `protobuf:"bytes,3,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` + Alias string `protobuf:"bytes,4,opt,name=alias,proto3" json:"alias,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CreateAliasRequest) Reset() { *m = CreateAliasRequest{} } +func (m *CreateAliasRequest) String() string { return proto.CompactTextString(m) } +func (*CreateAliasRequest) ProtoMessage() {} +func (*CreateAliasRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{8} +} + +func (m *CreateAliasRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CreateAliasRequest.Unmarshal(m, b) +} +func (m *CreateAliasRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CreateAliasRequest.Marshal(b, m, deterministic) +} +func (m *CreateAliasRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateAliasRequest.Merge(m, src) +} +func (m *CreateAliasRequest) XXX_Size() int { + return xxx_messageInfo_CreateAliasRequest.Size(m) +} +func (m *CreateAliasRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CreateAliasRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateAliasRequest proto.InternalMessageInfo + +func (m *CreateAliasRequest) GetBase() *commonpb.MsgBase { + if m != nil { + return m.Base + } + return nil +} + +func (m *CreateAliasRequest) GetDbName() string { + if m != nil { + return m.DbName + } + return "" +} + +func (m *CreateAliasRequest) GetCollectionName() string { + if m != nil { + return m.CollectionName + } + return "" +} + +func (m *CreateAliasRequest) GetAlias() string { + if m != nil { + return m.Alias + } + return "" +} + +type DropAliasRequest struct { + Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` + Alias string `protobuf:"bytes,3,opt,name=alias,proto3" json:"alias,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DropAliasRequest) Reset() { *m = DropAliasRequest{} } +func (m *DropAliasRequest) String() string { return proto.CompactTextString(m) } +func (*DropAliasRequest) ProtoMessage() {} +func (*DropAliasRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{9} +} + +func (m *DropAliasRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DropAliasRequest.Unmarshal(m, b) +} +func (m *DropAliasRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DropAliasRequest.Marshal(b, m, deterministic) +} +func (m *DropAliasRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DropAliasRequest.Merge(m, src) +} +func (m *DropAliasRequest) XXX_Size() int { + return xxx_messageInfo_DropAliasRequest.Size(m) +} +func (m *DropAliasRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DropAliasRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DropAliasRequest proto.InternalMessageInfo + +func (m *DropAliasRequest) GetBase() *commonpb.MsgBase { + if m != nil { + return m.Base + } + return nil +} + +func (m *DropAliasRequest) GetDbName() string { + if m != nil { + return m.DbName + } + return "" +} + +func (m *DropAliasRequest) GetAlias() string { + if m != nil { + return m.Alias + } + return "" +} + +type AlterAliasRequest struct { + Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` + CollectionName string `protobuf:"bytes,3,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` + Alias string `protobuf:"bytes,4,opt,name=alias,proto3" json:"alias,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AlterAliasRequest) Reset() { *m = AlterAliasRequest{} } +func (m *AlterAliasRequest) String() string { return proto.CompactTextString(m) } +func (*AlterAliasRequest) ProtoMessage() {} +func (*AlterAliasRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{10} +} + +func (m *AlterAliasRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AlterAliasRequest.Unmarshal(m, b) +} +func (m *AlterAliasRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AlterAliasRequest.Marshal(b, m, deterministic) +} +func (m *AlterAliasRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AlterAliasRequest.Merge(m, src) +} +func (m *AlterAliasRequest) XXX_Size() int { + return xxx_messageInfo_AlterAliasRequest.Size(m) +} +func (m *AlterAliasRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AlterAliasRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_AlterAliasRequest proto.InternalMessageInfo + +func (m *AlterAliasRequest) GetBase() *commonpb.MsgBase { + if m != nil { + return m.Base + } + return nil +} + +func (m *AlterAliasRequest) GetDbName() string { + if m != nil { + return m.DbName + } + return "" +} + +func (m *AlterAliasRequest) GetCollectionName() string { + if m != nil { + return m.CollectionName + } + return "" +} + +func (m *AlterAliasRequest) GetAlias() string { + if m != nil { + return m.Alias + } + return "" +} + +type CreateIndexRequest struct { + Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` + CollectionName string `protobuf:"bytes,3,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` + FieldName string `protobuf:"bytes,4,opt,name=field_name,json=fieldName,proto3" json:"field_name,omitempty"` + DbID int64 `protobuf:"varint,5,opt,name=dbID,proto3" json:"dbID,omitempty"` + CollectionID int64 `protobuf:"varint,6,opt,name=collectionID,proto3" json:"collectionID,omitempty"` + FieldID int64 `protobuf:"varint,7,opt,name=fieldID,proto3" json:"fieldID,omitempty"` + ExtraParams []*commonpb.KeyValuePair `protobuf:"bytes,8,rep,name=extra_params,json=extraParams,proto3" json:"extra_params,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CreateIndexRequest) Reset() { *m = CreateIndexRequest{} } +func (m *CreateIndexRequest) String() string { return proto.CompactTextString(m) } +func (*CreateIndexRequest) ProtoMessage() {} +func (*CreateIndexRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{11} +} + +func (m *CreateIndexRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CreateIndexRequest.Unmarshal(m, b) +} +func (m *CreateIndexRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CreateIndexRequest.Marshal(b, m, deterministic) +} +func (m *CreateIndexRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateIndexRequest.Merge(m, src) +} +func (m *CreateIndexRequest) XXX_Size() int { + return xxx_messageInfo_CreateIndexRequest.Size(m) +} +func (m *CreateIndexRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CreateIndexRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateIndexRequest proto.InternalMessageInfo + +func (m *CreateIndexRequest) GetBase() *commonpb.MsgBase { + if m != nil { + return m.Base + } + return nil +} + +func (m *CreateIndexRequest) GetDbName() string { + if m != nil { + return m.DbName + } + return "" +} + +func (m *CreateIndexRequest) GetCollectionName() string { + if m != nil { + return m.CollectionName + } + return "" +} + +func (m *CreateIndexRequest) GetFieldName() string { + if m != nil { + return m.FieldName + } + return "" +} + +func (m *CreateIndexRequest) GetDbID() int64 { + if m != nil { + return m.DbID + } + return 0 +} + +func (m *CreateIndexRequest) GetCollectionID() int64 { + if m != nil { + return m.CollectionID + } + return 0 +} + +func (m *CreateIndexRequest) GetFieldID() int64 { + if m != nil { + return m.FieldID + } + return 0 +} + +func (m *CreateIndexRequest) GetExtraParams() []*commonpb.KeyValuePair { + if m != nil { + return m.ExtraParams + } + return nil +} + +type SearchRequest struct { + Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + ReqID int64 `protobuf:"varint,2,opt,name=reqID,proto3" json:"reqID,omitempty"` + DbID int64 `protobuf:"varint,3,opt,name=dbID,proto3" json:"dbID,omitempty"` + CollectionID int64 `protobuf:"varint,4,opt,name=collectionID,proto3" json:"collectionID,omitempty"` + PartitionIDs []int64 `protobuf:"varint,5,rep,packed,name=partitionIDs,proto3" json:"partitionIDs,omitempty"` + Dsl string `protobuf:"bytes,6,opt,name=dsl,proto3" json:"dsl,omitempty"` + // serialized `PlaceholderGroup` + PlaceholderGroup []byte `protobuf:"bytes,7,opt,name=placeholder_group,json=placeholderGroup,proto3" json:"placeholder_group,omitempty"` + DslType commonpb.DslType `protobuf:"varint,8,opt,name=dsl_type,json=dslType,proto3,enum=milvus.proto.common.DslType" json:"dsl_type,omitempty"` + SerializedExprPlan []byte `protobuf:"bytes,9,opt,name=serialized_expr_plan,json=serializedExprPlan,proto3" json:"serialized_expr_plan,omitempty"` + OutputFieldsId []int64 `protobuf:"varint,10,rep,packed,name=output_fields_id,json=outputFieldsId,proto3" json:"output_fields_id,omitempty"` + TravelTimestamp uint64 `protobuf:"varint,11,opt,name=travel_timestamp,json=travelTimestamp,proto3" json:"travel_timestamp,omitempty"` + GuaranteeTimestamp uint64 `protobuf:"varint,12,opt,name=guarantee_timestamp,json=guaranteeTimestamp,proto3" json:"guarantee_timestamp,omitempty"` + TimeoutTimestamp uint64 `protobuf:"varint,13,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` + 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"` + Username string `protobuf:"bytes,18,opt,name=username,proto3" json:"username,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SearchRequest) Reset() { *m = SearchRequest{} } +func (m *SearchRequest) String() string { return proto.CompactTextString(m) } +func (*SearchRequest) ProtoMessage() {} +func (*SearchRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{12} +} + +func (m *SearchRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SearchRequest.Unmarshal(m, b) +} +func (m *SearchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SearchRequest.Marshal(b, m, deterministic) +} +func (m *SearchRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SearchRequest.Merge(m, src) +} +func (m *SearchRequest) XXX_Size() int { + return xxx_messageInfo_SearchRequest.Size(m) +} +func (m *SearchRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SearchRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SearchRequest proto.InternalMessageInfo + +func (m *SearchRequest) GetBase() *commonpb.MsgBase { + if m != nil { + return m.Base + } + return nil +} + +func (m *SearchRequest) GetReqID() int64 { + if m != nil { + return m.ReqID + } + return 0 +} + +func (m *SearchRequest) GetDbID() int64 { + if m != nil { + return m.DbID + } + return 0 +} + +func (m *SearchRequest) GetCollectionID() int64 { + if m != nil { + return m.CollectionID + } + return 0 +} + +func (m *SearchRequest) GetPartitionIDs() []int64 { + if m != nil { + return m.PartitionIDs + } + return nil +} + +func (m *SearchRequest) GetDsl() string { + if m != nil { + return m.Dsl + } + return "" +} + +func (m *SearchRequest) GetPlaceholderGroup() []byte { + if m != nil { + return m.PlaceholderGroup + } + return nil +} + +func (m *SearchRequest) GetDslType() commonpb.DslType { + if m != nil { + return m.DslType + } + return commonpb.DslType_Dsl +} + +func (m *SearchRequest) GetSerializedExprPlan() []byte { + if m != nil { + return m.SerializedExprPlan + } + return nil +} + +func (m *SearchRequest) GetOutputFieldsId() []int64 { + if m != nil { + return m.OutputFieldsId + } + return nil +} + +func (m *SearchRequest) GetTravelTimestamp() uint64 { + if m != nil { + return m.TravelTimestamp + } + return 0 +} + +func (m *SearchRequest) GetGuaranteeTimestamp() uint64 { + if m != nil { + return m.GuaranteeTimestamp + } + return 0 +} + +func (m *SearchRequest) GetTimeoutTimestamp() uint64 { + if m != nil { + return m.TimeoutTimestamp + } + return 0 +} + +func (m *SearchRequest) GetNq() int64 { + if m != nil { + return m.Nq + } + return 0 +} + +func (m *SearchRequest) GetTopk() int64 { + if m != nil { + return m.Topk + } + return 0 +} + +func (m *SearchRequest) GetMetricType() string { + if m != nil { + return m.MetricType + } + return "" +} + +func (m *SearchRequest) GetIgnoreGrowing() bool { + if m != nil { + return m.IgnoreGrowing + } + return false +} + +func (m *SearchRequest) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +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"` + ReqID int64 `protobuf:"varint,3,opt,name=reqID,proto3" json:"reqID,omitempty"` + MetricType string `protobuf:"bytes,4,opt,name=metric_type,json=metricType,proto3" json:"metric_type,omitempty"` + NumQueries int64 `protobuf:"varint,5,opt,name=num_queries,json=numQueries,proto3" json:"num_queries,omitempty"` + TopK int64 `protobuf:"varint,6,opt,name=top_k,json=topK,proto3" json:"top_k,omitempty"` + SealedSegmentIDsSearched []int64 `protobuf:"varint,7,rep,packed,name=sealed_segmentIDs_searched,json=sealedSegmentIDsSearched,proto3" json:"sealed_segmentIDs_searched,omitempty"` + ChannelIDsSearched []string `protobuf:"bytes,8,rep,name=channelIDs_searched,json=channelIDsSearched,proto3" json:"channelIDs_searched,omitempty"` + GlobalSealedSegmentIDs []int64 `protobuf:"varint,9,rep,packed,name=global_sealed_segmentIDs,json=globalSealedSegmentIDs,proto3" json:"global_sealed_segmentIDs,omitempty"` + // schema.SearchResultsData inside + SlicedBlob []byte `protobuf:"bytes,10,opt,name=sliced_blob,json=slicedBlob,proto3" json:"sliced_blob,omitempty"` + SlicedNumCount int64 `protobuf:"varint,11,opt,name=sliced_num_count,json=slicedNumCount,proto3" json:"sliced_num_count,omitempty"` + SlicedOffset int64 `protobuf:"varint,12,opt,name=sliced_offset,json=slicedOffset,proto3" json:"sliced_offset,omitempty"` + // search request cost + CostAggregation *CostAggregation `protobuf:"bytes,13,opt,name=costAggregation,proto3" json:"costAggregation,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SearchResults) Reset() { *m = SearchResults{} } +func (m *SearchResults) String() string { return proto.CompactTextString(m) } +func (*SearchResults) ProtoMessage() {} +func (*SearchResults) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{13} +} + +func (m *SearchResults) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SearchResults.Unmarshal(m, b) +} +func (m *SearchResults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SearchResults.Marshal(b, m, deterministic) +} +func (m *SearchResults) XXX_Merge(src proto.Message) { + xxx_messageInfo_SearchResults.Merge(m, src) +} +func (m *SearchResults) XXX_Size() int { + return xxx_messageInfo_SearchResults.Size(m) +} +func (m *SearchResults) XXX_DiscardUnknown() { + xxx_messageInfo_SearchResults.DiscardUnknown(m) +} + +var xxx_messageInfo_SearchResults proto.InternalMessageInfo + +func (m *SearchResults) GetBase() *commonpb.MsgBase { + if m != nil { + return m.Base + } + return nil +} + +func (m *SearchResults) GetStatus() *commonpb.Status { + if m != nil { + return m.Status + } + return nil +} + +func (m *SearchResults) GetReqID() int64 { + if m != nil { + return m.ReqID + } + return 0 +} + +func (m *SearchResults) GetMetricType() string { + if m != nil { + return m.MetricType + } + return "" +} + +func (m *SearchResults) GetNumQueries() int64 { + if m != nil { + return m.NumQueries + } + return 0 +} + +func (m *SearchResults) GetTopK() int64 { + if m != nil { + return m.TopK + } + return 0 +} + +func (m *SearchResults) GetSealedSegmentIDsSearched() []int64 { + if m != nil { + return m.SealedSegmentIDsSearched + } + return nil +} + +func (m *SearchResults) GetChannelIDsSearched() []string { + if m != nil { + return m.ChannelIDsSearched + } + return nil +} + +func (m *SearchResults) GetGlobalSealedSegmentIDs() []int64 { + if m != nil { + return m.GlobalSealedSegmentIDs + } + return nil +} + +func (m *SearchResults) GetSlicedBlob() []byte { + if m != nil { + return m.SlicedBlob + } + return nil +} + +func (m *SearchResults) GetSlicedNumCount() int64 { + if m != nil { + return m.SlicedNumCount + } + return 0 +} + +func (m *SearchResults) GetSlicedOffset() int64 { + if m != nil { + return m.SlicedOffset + } + return 0 +} + +func (m *SearchResults) GetCostAggregation() *CostAggregation { + if m != nil { + return m.CostAggregation + } + return nil +} + +type CostAggregation struct { + ResponseTime int64 `protobuf:"varint,1,opt,name=responseTime,proto3" json:"responseTime,omitempty"` + ServiceTime int64 `protobuf:"varint,2,opt,name=serviceTime,proto3" json:"serviceTime,omitempty"` + TotalNQ int64 `protobuf:"varint,3,opt,name=totalNQ,proto3" json:"totalNQ,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CostAggregation) Reset() { *m = CostAggregation{} } +func (m *CostAggregation) String() string { return proto.CompactTextString(m) } +func (*CostAggregation) ProtoMessage() {} +func (*CostAggregation) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{14} +} + +func (m *CostAggregation) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CostAggregation.Unmarshal(m, b) +} +func (m *CostAggregation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CostAggregation.Marshal(b, m, deterministic) +} +func (m *CostAggregation) XXX_Merge(src proto.Message) { + xxx_messageInfo_CostAggregation.Merge(m, src) +} +func (m *CostAggregation) XXX_Size() int { + return xxx_messageInfo_CostAggregation.Size(m) +} +func (m *CostAggregation) XXX_DiscardUnknown() { + xxx_messageInfo_CostAggregation.DiscardUnknown(m) +} + +var xxx_messageInfo_CostAggregation proto.InternalMessageInfo + +func (m *CostAggregation) GetResponseTime() int64 { + if m != nil { + return m.ResponseTime + } + return 0 +} + +func (m *CostAggregation) GetServiceTime() int64 { + if m != nil { + return m.ServiceTime + } + return 0 +} + +func (m *CostAggregation) GetTotalNQ() int64 { + if m != nil { + return m.TotalNQ + } + return 0 +} + +type RetrieveRequest struct { + Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + ReqID int64 `protobuf:"varint,2,opt,name=reqID,proto3" json:"reqID,omitempty"` + DbID int64 `protobuf:"varint,3,opt,name=dbID,proto3" json:"dbID,omitempty"` + CollectionID int64 `protobuf:"varint,4,opt,name=collectionID,proto3" json:"collectionID,omitempty"` + PartitionIDs []int64 `protobuf:"varint,5,rep,packed,name=partitionIDs,proto3" json:"partitionIDs,omitempty"` + SerializedExprPlan []byte `protobuf:"bytes,6,opt,name=serialized_expr_plan,json=serializedExprPlan,proto3" json:"serialized_expr_plan,omitempty"` + OutputFieldsId []int64 `protobuf:"varint,7,rep,packed,name=output_fields_id,json=outputFieldsId,proto3" json:"output_fields_id,omitempty"` + TravelTimestamp uint64 `protobuf:"varint,8,opt,name=travel_timestamp,json=travelTimestamp,proto3" json:"travel_timestamp,omitempty"` + 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"` + IsCount bool `protobuf:"varint,13,opt,name=is_count,json=isCount,proto3" json:"is_count,omitempty"` + IterationExtensionReduceRate int64 `protobuf:"varint,14,opt,name=iteration_extension_reduce_rate,json=iterationExtensionReduceRate,proto3" json:"iteration_extension_reduce_rate,omitempty"` + Username string `protobuf:"bytes,15,opt,name=username,proto3" json:"username,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RetrieveRequest) Reset() { *m = RetrieveRequest{} } +func (m *RetrieveRequest) String() string { return proto.CompactTextString(m) } +func (*RetrieveRequest) ProtoMessage() {} +func (*RetrieveRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{15} +} + +func (m *RetrieveRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RetrieveRequest.Unmarshal(m, b) +} +func (m *RetrieveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RetrieveRequest.Marshal(b, m, deterministic) +} +func (m *RetrieveRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RetrieveRequest.Merge(m, src) +} +func (m *RetrieveRequest) XXX_Size() int { + return xxx_messageInfo_RetrieveRequest.Size(m) +} +func (m *RetrieveRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RetrieveRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RetrieveRequest proto.InternalMessageInfo + +func (m *RetrieveRequest) GetBase() *commonpb.MsgBase { + if m != nil { + return m.Base + } + return nil +} + +func (m *RetrieveRequest) GetReqID() int64 { + if m != nil { + return m.ReqID + } + return 0 +} + +func (m *RetrieveRequest) GetDbID() int64 { + if m != nil { + return m.DbID + } + return 0 +} + +func (m *RetrieveRequest) GetCollectionID() int64 { + if m != nil { + return m.CollectionID + } + return 0 +} + +func (m *RetrieveRequest) GetPartitionIDs() []int64 { + if m != nil { + return m.PartitionIDs + } + return nil +} + +func (m *RetrieveRequest) GetSerializedExprPlan() []byte { + if m != nil { + return m.SerializedExprPlan + } + return nil +} + +func (m *RetrieveRequest) GetOutputFieldsId() []int64 { + if m != nil { + return m.OutputFieldsId + } + return nil +} + +func (m *RetrieveRequest) GetTravelTimestamp() uint64 { + if m != nil { + return m.TravelTimestamp + } + return 0 +} + +func (m *RetrieveRequest) GetGuaranteeTimestamp() uint64 { + if m != nil { + return m.GuaranteeTimestamp + } + return 0 +} + +func (m *RetrieveRequest) GetTimeoutTimestamp() uint64 { + if m != nil { + return m.TimeoutTimestamp + } + return 0 +} + +func (m *RetrieveRequest) GetLimit() int64 { + if m != nil { + return m.Limit + } + return 0 +} + +func (m *RetrieveRequest) GetIgnoreGrowing() bool { + if m != nil { + return m.IgnoreGrowing + } + return false +} + +func (m *RetrieveRequest) GetIsCount() bool { + if m != nil { + return m.IsCount + } + return false +} + +func (m *RetrieveRequest) GetIterationExtensionReduceRate() int64 { + if m != nil { + return m.IterationExtensionReduceRate + } + return 0 +} + +func (m *RetrieveRequest) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +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"` + ReqID int64 `protobuf:"varint,3,opt,name=reqID,proto3" json:"reqID,omitempty"` + Ids *schemapb.IDs `protobuf:"bytes,4,opt,name=ids,proto3" json:"ids,omitempty"` + FieldsData []*schemapb.FieldData `protobuf:"bytes,5,rep,name=fields_data,json=fieldsData,proto3" json:"fields_data,omitempty"` + SealedSegmentIDsRetrieved []int64 `protobuf:"varint,6,rep,packed,name=sealed_segmentIDs_retrieved,json=sealedSegmentIDsRetrieved,proto3" json:"sealed_segmentIDs_retrieved,omitempty"` + ChannelIDsRetrieved []string `protobuf:"bytes,7,rep,name=channelIDs_retrieved,json=channelIDsRetrieved,proto3" json:"channelIDs_retrieved,omitempty"` + GlobalSealedSegmentIDs []int64 `protobuf:"varint,8,rep,packed,name=global_sealed_segmentIDs,json=globalSealedSegmentIDs,proto3" json:"global_sealed_segmentIDs,omitempty"` + // query request cost + CostAggregation *CostAggregation `protobuf:"bytes,13,opt,name=costAggregation,proto3" json:"costAggregation,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RetrieveResults) Reset() { *m = RetrieveResults{} } +func (m *RetrieveResults) String() string { return proto.CompactTextString(m) } +func (*RetrieveResults) ProtoMessage() {} +func (*RetrieveResults) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{16} +} + +func (m *RetrieveResults) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RetrieveResults.Unmarshal(m, b) +} +func (m *RetrieveResults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RetrieveResults.Marshal(b, m, deterministic) +} +func (m *RetrieveResults) XXX_Merge(src proto.Message) { + xxx_messageInfo_RetrieveResults.Merge(m, src) +} +func (m *RetrieveResults) XXX_Size() int { + return xxx_messageInfo_RetrieveResults.Size(m) +} +func (m *RetrieveResults) XXX_DiscardUnknown() { + xxx_messageInfo_RetrieveResults.DiscardUnknown(m) +} + +var xxx_messageInfo_RetrieveResults proto.InternalMessageInfo + +func (m *RetrieveResults) GetBase() *commonpb.MsgBase { + if m != nil { + return m.Base + } + return nil +} + +func (m *RetrieveResults) GetStatus() *commonpb.Status { + if m != nil { + return m.Status + } + return nil +} + +func (m *RetrieveResults) GetReqID() int64 { + if m != nil { + return m.ReqID + } + return 0 +} + +func (m *RetrieveResults) GetIds() *schemapb.IDs { + if m != nil { + return m.Ids + } + return nil +} + +func (m *RetrieveResults) GetFieldsData() []*schemapb.FieldData { + if m != nil { + return m.FieldsData + } + return nil +} + +func (m *RetrieveResults) GetSealedSegmentIDsRetrieved() []int64 { + if m != nil { + return m.SealedSegmentIDsRetrieved + } + return nil +} + +func (m *RetrieveResults) GetChannelIDsRetrieved() []string { + if m != nil { + return m.ChannelIDsRetrieved + } + return nil +} + +func (m *RetrieveResults) GetGlobalSealedSegmentIDs() []int64 { + if m != nil { + return m.GlobalSealedSegmentIDs + } + return nil +} + +func (m *RetrieveResults) GetCostAggregation() *CostAggregation { + if m != nil { + return m.CostAggregation + } + return nil +} + +type LoadIndex struct { + Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + SegmentID int64 `protobuf:"varint,2,opt,name=segmentID,proto3" json:"segmentID,omitempty"` + FieldName string `protobuf:"bytes,3,opt,name=fieldName,proto3" json:"fieldName,omitempty"` + FieldID int64 `protobuf:"varint,4,opt,name=fieldID,proto3" json:"fieldID,omitempty"` + IndexPaths []string `protobuf:"bytes,5,rep,name=index_paths,json=indexPaths,proto3" json:"index_paths,omitempty"` + IndexParams []*commonpb.KeyValuePair `protobuf:"bytes,6,rep,name=index_params,json=indexParams,proto3" json:"index_params,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LoadIndex) Reset() { *m = LoadIndex{} } +func (m *LoadIndex) String() string { return proto.CompactTextString(m) } +func (*LoadIndex) ProtoMessage() {} +func (*LoadIndex) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{17} +} + +func (m *LoadIndex) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LoadIndex.Unmarshal(m, b) +} +func (m *LoadIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LoadIndex.Marshal(b, m, deterministic) +} +func (m *LoadIndex) XXX_Merge(src proto.Message) { + xxx_messageInfo_LoadIndex.Merge(m, src) +} +func (m *LoadIndex) XXX_Size() int { + return xxx_messageInfo_LoadIndex.Size(m) +} +func (m *LoadIndex) XXX_DiscardUnknown() { + xxx_messageInfo_LoadIndex.DiscardUnknown(m) +} + +var xxx_messageInfo_LoadIndex proto.InternalMessageInfo + +func (m *LoadIndex) GetBase() *commonpb.MsgBase { + if m != nil { + return m.Base + } + return nil +} + +func (m *LoadIndex) GetSegmentID() int64 { + if m != nil { + return m.SegmentID + } + return 0 +} + +func (m *LoadIndex) GetFieldName() string { + if m != nil { + return m.FieldName + } + return "" +} + +func (m *LoadIndex) GetFieldID() int64 { + if m != nil { + return m.FieldID + } + return 0 +} + +func (m *LoadIndex) GetIndexPaths() []string { + if m != nil { + return m.IndexPaths + } + return nil +} + +func (m *LoadIndex) GetIndexParams() []*commonpb.KeyValuePair { + if m != nil { + return m.IndexParams + } + return nil +} + +type IndexStats struct { + IndexParams []*commonpb.KeyValuePair `protobuf:"bytes,1,rep,name=index_params,json=indexParams,proto3" json:"index_params,omitempty"` + NumRelatedSegments int64 `protobuf:"varint,2,opt,name=num_related_segments,json=numRelatedSegments,proto3" json:"num_related_segments,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IndexStats) Reset() { *m = IndexStats{} } +func (m *IndexStats) String() string { return proto.CompactTextString(m) } +func (*IndexStats) ProtoMessage() {} +func (*IndexStats) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{18} +} + +func (m *IndexStats) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IndexStats.Unmarshal(m, b) +} +func (m *IndexStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IndexStats.Marshal(b, m, deterministic) +} +func (m *IndexStats) XXX_Merge(src proto.Message) { + xxx_messageInfo_IndexStats.Merge(m, src) +} +func (m *IndexStats) XXX_Size() int { + return xxx_messageInfo_IndexStats.Size(m) +} +func (m *IndexStats) XXX_DiscardUnknown() { + xxx_messageInfo_IndexStats.DiscardUnknown(m) +} + +var xxx_messageInfo_IndexStats proto.InternalMessageInfo + +func (m *IndexStats) GetIndexParams() []*commonpb.KeyValuePair { + if m != nil { + return m.IndexParams + } + return nil +} + +func (m *IndexStats) GetNumRelatedSegments() int64 { + if m != nil { + return m.NumRelatedSegments + } + return 0 +} + +type FieldStats struct { + CollectionID int64 `protobuf:"varint,1,opt,name=collectionID,proto3" json:"collectionID,omitempty"` + FieldID int64 `protobuf:"varint,2,opt,name=fieldID,proto3" json:"fieldID,omitempty"` + IndexStats []*IndexStats `protobuf:"bytes,3,rep,name=index_stats,json=indexStats,proto3" json:"index_stats,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FieldStats) Reset() { *m = FieldStats{} } +func (m *FieldStats) String() string { return proto.CompactTextString(m) } +func (*FieldStats) ProtoMessage() {} +func (*FieldStats) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{19} +} + +func (m *FieldStats) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FieldStats.Unmarshal(m, b) +} +func (m *FieldStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FieldStats.Marshal(b, m, deterministic) +} +func (m *FieldStats) XXX_Merge(src proto.Message) { + xxx_messageInfo_FieldStats.Merge(m, src) +} +func (m *FieldStats) XXX_Size() int { + return xxx_messageInfo_FieldStats.Size(m) +} +func (m *FieldStats) XXX_DiscardUnknown() { + xxx_messageInfo_FieldStats.DiscardUnknown(m) +} + +var xxx_messageInfo_FieldStats proto.InternalMessageInfo + +func (m *FieldStats) GetCollectionID() int64 { + if m != nil { + return m.CollectionID + } + return 0 +} + +func (m *FieldStats) GetFieldID() int64 { + if m != nil { + return m.FieldID + } + return 0 +} + +func (m *FieldStats) GetIndexStats() []*IndexStats { + if m != nil { + return m.IndexStats + } + return nil +} + +type SegmentStats struct { + SegmentID int64 `protobuf:"varint,1,opt,name=segmentID,proto3" json:"segmentID,omitempty"` + MemorySize int64 `protobuf:"varint,2,opt,name=memory_size,json=memorySize,proto3" json:"memory_size,omitempty"` + NumRows int64 `protobuf:"varint,3,opt,name=num_rows,json=numRows,proto3" json:"num_rows,omitempty"` + RecentlyModified bool `protobuf:"varint,4,opt,name=recently_modified,json=recentlyModified,proto3" json:"recently_modified,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SegmentStats) Reset() { *m = SegmentStats{} } +func (m *SegmentStats) String() string { return proto.CompactTextString(m) } +func (*SegmentStats) ProtoMessage() {} +func (*SegmentStats) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{20} +} + +func (m *SegmentStats) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SegmentStats.Unmarshal(m, b) +} +func (m *SegmentStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SegmentStats.Marshal(b, m, deterministic) +} +func (m *SegmentStats) XXX_Merge(src proto.Message) { + xxx_messageInfo_SegmentStats.Merge(m, src) +} +func (m *SegmentStats) XXX_Size() int { + return xxx_messageInfo_SegmentStats.Size(m) +} +func (m *SegmentStats) XXX_DiscardUnknown() { + xxx_messageInfo_SegmentStats.DiscardUnknown(m) +} + +var xxx_messageInfo_SegmentStats proto.InternalMessageInfo + +func (m *SegmentStats) GetSegmentID() int64 { + if m != nil { + return m.SegmentID + } + return 0 +} + +func (m *SegmentStats) GetMemorySize() int64 { + if m != nil { + return m.MemorySize + } + return 0 +} + +func (m *SegmentStats) GetNumRows() int64 { + if m != nil { + return m.NumRows + } + return 0 +} + +func (m *SegmentStats) GetRecentlyModified() bool { + if m != nil { + return m.RecentlyModified + } + return false +} + +type ChannelTimeTickMsg struct { + Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + ChannelNames []string `protobuf:"bytes,2,rep,name=channelNames,proto3" json:"channelNames,omitempty"` + Timestamps []uint64 `protobuf:"varint,3,rep,packed,name=timestamps,proto3" json:"timestamps,omitempty"` + DefaultTimestamp uint64 `protobuf:"varint,4,opt,name=default_timestamp,json=defaultTimestamp,proto3" json:"default_timestamp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ChannelTimeTickMsg) Reset() { *m = ChannelTimeTickMsg{} } +func (m *ChannelTimeTickMsg) String() string { return proto.CompactTextString(m) } +func (*ChannelTimeTickMsg) ProtoMessage() {} +func (*ChannelTimeTickMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{21} +} + +func (m *ChannelTimeTickMsg) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ChannelTimeTickMsg.Unmarshal(m, b) +} +func (m *ChannelTimeTickMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ChannelTimeTickMsg.Marshal(b, m, deterministic) +} +func (m *ChannelTimeTickMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChannelTimeTickMsg.Merge(m, src) +} +func (m *ChannelTimeTickMsg) XXX_Size() int { + return xxx_messageInfo_ChannelTimeTickMsg.Size(m) +} +func (m *ChannelTimeTickMsg) XXX_DiscardUnknown() { + xxx_messageInfo_ChannelTimeTickMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_ChannelTimeTickMsg proto.InternalMessageInfo + +func (m *ChannelTimeTickMsg) GetBase() *commonpb.MsgBase { + if m != nil { + return m.Base + } + return nil +} + +func (m *ChannelTimeTickMsg) GetChannelNames() []string { + if m != nil { + return m.ChannelNames + } + return nil +} + +func (m *ChannelTimeTickMsg) GetTimestamps() []uint64 { + if m != nil { + return m.Timestamps + } + return nil +} + +func (m *ChannelTimeTickMsg) GetDefaultTimestamp() uint64 { + if m != nil { + return m.DefaultTimestamp + } + return 0 +} + +type CredentialInfo struct { + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + // encrypted by bcrypt (for higher security level) + EncryptedPassword string `protobuf:"bytes,2,opt,name=encrypted_password,json=encryptedPassword,proto3" json:"encrypted_password,omitempty"` + Tenant string `protobuf:"bytes,3,opt,name=tenant,proto3" json:"tenant,omitempty"` + IsSuper bool `protobuf:"varint,4,opt,name=is_super,json=isSuper,proto3" json:"is_super,omitempty"` + // encrypted by sha256 (for good performance in cache mapping) + Sha256Password string `protobuf:"bytes,5,opt,name=sha256_password,json=sha256Password,proto3" json:"sha256_password,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CredentialInfo) Reset() { *m = CredentialInfo{} } +func (m *CredentialInfo) String() string { return proto.CompactTextString(m) } +func (*CredentialInfo) ProtoMessage() {} +func (*CredentialInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{22} +} + +func (m *CredentialInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CredentialInfo.Unmarshal(m, b) +} +func (m *CredentialInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CredentialInfo.Marshal(b, m, deterministic) +} +func (m *CredentialInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_CredentialInfo.Merge(m, src) +} +func (m *CredentialInfo) XXX_Size() int { + return xxx_messageInfo_CredentialInfo.Size(m) +} +func (m *CredentialInfo) XXX_DiscardUnknown() { + xxx_messageInfo_CredentialInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_CredentialInfo proto.InternalMessageInfo + +func (m *CredentialInfo) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +func (m *CredentialInfo) GetEncryptedPassword() string { + if m != nil { + return m.EncryptedPassword + } + return "" +} + +func (m *CredentialInfo) GetTenant() string { + if m != nil { + return m.Tenant + } + return "" +} + +func (m *CredentialInfo) GetIsSuper() bool { + if m != nil { + return m.IsSuper + } + return false +} + +func (m *CredentialInfo) GetSha256Password() string { + if m != nil { + return m.Sha256Password + } + return "" +} + +type ListPolicyRequest struct { + // Not useful for now + Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListPolicyRequest) Reset() { *m = ListPolicyRequest{} } +func (m *ListPolicyRequest) String() string { return proto.CompactTextString(m) } +func (*ListPolicyRequest) ProtoMessage() {} +func (*ListPolicyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{23} +} + +func (m *ListPolicyRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListPolicyRequest.Unmarshal(m, b) +} +func (m *ListPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListPolicyRequest.Marshal(b, m, deterministic) +} +func (m *ListPolicyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListPolicyRequest.Merge(m, src) +} +func (m *ListPolicyRequest) XXX_Size() int { + return xxx_messageInfo_ListPolicyRequest.Size(m) +} +func (m *ListPolicyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListPolicyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListPolicyRequest proto.InternalMessageInfo + +func (m *ListPolicyRequest) GetBase() *commonpb.MsgBase { + if m != nil { + return m.Base + } + return nil +} + +type ListPolicyResponse struct { + // Contain error_code and reason + Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + PolicyInfos []string `protobuf:"bytes,2,rep,name=policy_infos,json=policyInfos,proto3" json:"policy_infos,omitempty"` + UserRoles []string `protobuf:"bytes,3,rep,name=user_roles,json=userRoles,proto3" json:"user_roles,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListPolicyResponse) Reset() { *m = ListPolicyResponse{} } +func (m *ListPolicyResponse) String() string { return proto.CompactTextString(m) } +func (*ListPolicyResponse) ProtoMessage() {} +func (*ListPolicyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{24} +} + +func (m *ListPolicyResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListPolicyResponse.Unmarshal(m, b) +} +func (m *ListPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListPolicyResponse.Marshal(b, m, deterministic) +} +func (m *ListPolicyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListPolicyResponse.Merge(m, src) +} +func (m *ListPolicyResponse) XXX_Size() int { + return xxx_messageInfo_ListPolicyResponse.Size(m) +} +func (m *ListPolicyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListPolicyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListPolicyResponse proto.InternalMessageInfo + +func (m *ListPolicyResponse) GetStatus() *commonpb.Status { + if m != nil { + return m.Status + } + return nil +} + +func (m *ListPolicyResponse) GetPolicyInfos() []string { + if m != nil { + return m.PolicyInfos + } + return nil +} + +func (m *ListPolicyResponse) GetUserRoles() []string { + if m != nil { + return m.UserRoles + } + return nil +} + +type ShowConfigurationsRequest struct { + Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + Pattern string `protobuf:"bytes,2,opt,name=pattern,proto3" json:"pattern,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ShowConfigurationsRequest) Reset() { *m = ShowConfigurationsRequest{} } +func (m *ShowConfigurationsRequest) String() string { return proto.CompactTextString(m) } +func (*ShowConfigurationsRequest) ProtoMessage() {} +func (*ShowConfigurationsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{25} +} + +func (m *ShowConfigurationsRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ShowConfigurationsRequest.Unmarshal(m, b) +} +func (m *ShowConfigurationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ShowConfigurationsRequest.Marshal(b, m, deterministic) +} +func (m *ShowConfigurationsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ShowConfigurationsRequest.Merge(m, src) +} +func (m *ShowConfigurationsRequest) XXX_Size() int { + return xxx_messageInfo_ShowConfigurationsRequest.Size(m) +} +func (m *ShowConfigurationsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ShowConfigurationsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ShowConfigurationsRequest proto.InternalMessageInfo + +func (m *ShowConfigurationsRequest) GetBase() *commonpb.MsgBase { + if m != nil { + return m.Base + } + return nil +} + +func (m *ShowConfigurationsRequest) GetPattern() string { + if m != nil { + return m.Pattern + } + return "" +} + +type ShowConfigurationsResponse struct { + Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Configuations []*commonpb.KeyValuePair `protobuf:"bytes,2,rep,name=configuations,proto3" json:"configuations,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ShowConfigurationsResponse) Reset() { *m = ShowConfigurationsResponse{} } +func (m *ShowConfigurationsResponse) String() string { return proto.CompactTextString(m) } +func (*ShowConfigurationsResponse) ProtoMessage() {} +func (*ShowConfigurationsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{26} +} + +func (m *ShowConfigurationsResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ShowConfigurationsResponse.Unmarshal(m, b) +} +func (m *ShowConfigurationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ShowConfigurationsResponse.Marshal(b, m, deterministic) +} +func (m *ShowConfigurationsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ShowConfigurationsResponse.Merge(m, src) +} +func (m *ShowConfigurationsResponse) XXX_Size() int { + return xxx_messageInfo_ShowConfigurationsResponse.Size(m) +} +func (m *ShowConfigurationsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ShowConfigurationsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ShowConfigurationsResponse proto.InternalMessageInfo + +func (m *ShowConfigurationsResponse) GetStatus() *commonpb.Status { + if m != nil { + return m.Status + } + return nil +} + +func (m *ShowConfigurationsResponse) GetConfiguations() []*commonpb.KeyValuePair { + if m != nil { + return m.Configuations + } + return nil +} + +type Rate struct { + Rt RateType `protobuf:"varint,1,opt,name=rt,proto3,enum=milvus.proto.internal.RateType" json:"rt,omitempty"` + R float64 `protobuf:"fixed64,2,opt,name=r,proto3" json:"r,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Rate) Reset() { *m = Rate{} } +func (m *Rate) String() string { return proto.CompactTextString(m) } +func (*Rate) ProtoMessage() {} +func (*Rate) Descriptor() ([]byte, []int) { + return fileDescriptor_41f4a519b878ee3b, []int{27} +} + +func (m *Rate) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Rate.Unmarshal(m, b) +} +func (m *Rate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Rate.Marshal(b, m, deterministic) +} +func (m *Rate) XXX_Merge(src proto.Message) { + xxx_messageInfo_Rate.Merge(m, src) +} +func (m *Rate) XXX_Size() int { + return xxx_messageInfo_Rate.Size(m) +} +func (m *Rate) XXX_DiscardUnknown() { + xxx_messageInfo_Rate.DiscardUnknown(m) +} + +var xxx_messageInfo_Rate proto.InternalMessageInfo + +func (m *Rate) GetRt() RateType { + if m != nil { + return m.Rt + } + return RateType_DDLCollection +} + +func (m *Rate) GetR() float64 { + if m != nil { + return m.R + } + return 0 +} + +func init() { + proto.RegisterEnum("milvus.proto.internal.RateType", RateType_name, RateType_value) + proto.RegisterType((*GetTimeTickChannelRequest)(nil), "milvus.proto.internal.GetTimeTickChannelRequest") + proto.RegisterType((*GetStatisticsChannelRequest)(nil), "milvus.proto.internal.GetStatisticsChannelRequest") + proto.RegisterType((*GetDdChannelRequest)(nil), "milvus.proto.internal.GetDdChannelRequest") + proto.RegisterType((*NodeInfo)(nil), "milvus.proto.internal.NodeInfo") + proto.RegisterType((*InitParams)(nil), "milvus.proto.internal.InitParams") + proto.RegisterType((*StringList)(nil), "milvus.proto.internal.StringList") + proto.RegisterType((*GetStatisticsRequest)(nil), "milvus.proto.internal.GetStatisticsRequest") + proto.RegisterType((*GetStatisticsResponse)(nil), "milvus.proto.internal.GetStatisticsResponse") + proto.RegisterType((*CreateAliasRequest)(nil), "milvus.proto.internal.CreateAliasRequest") + proto.RegisterType((*DropAliasRequest)(nil), "milvus.proto.internal.DropAliasRequest") + proto.RegisterType((*AlterAliasRequest)(nil), "milvus.proto.internal.AlterAliasRequest") + proto.RegisterType((*CreateIndexRequest)(nil), "milvus.proto.internal.CreateIndexRequest") + proto.RegisterType((*SearchRequest)(nil), "milvus.proto.internal.SearchRequest") + proto.RegisterType((*SearchResults)(nil), "milvus.proto.internal.SearchResults") + proto.RegisterType((*CostAggregation)(nil), "milvus.proto.internal.CostAggregation") + proto.RegisterType((*RetrieveRequest)(nil), "milvus.proto.internal.RetrieveRequest") + proto.RegisterType((*RetrieveResults)(nil), "milvus.proto.internal.RetrieveResults") + proto.RegisterType((*LoadIndex)(nil), "milvus.proto.internal.LoadIndex") + proto.RegisterType((*IndexStats)(nil), "milvus.proto.internal.IndexStats") + proto.RegisterType((*FieldStats)(nil), "milvus.proto.internal.FieldStats") + proto.RegisterType((*SegmentStats)(nil), "milvus.proto.internal.SegmentStats") + proto.RegisterType((*ChannelTimeTickMsg)(nil), "milvus.proto.internal.ChannelTimeTickMsg") + proto.RegisterType((*CredentialInfo)(nil), "milvus.proto.internal.CredentialInfo") + proto.RegisterType((*ListPolicyRequest)(nil), "milvus.proto.internal.ListPolicyRequest") + proto.RegisterType((*ListPolicyResponse)(nil), "milvus.proto.internal.ListPolicyResponse") + proto.RegisterType((*ShowConfigurationsRequest)(nil), "milvus.proto.internal.ShowConfigurationsRequest") + proto.RegisterType((*ShowConfigurationsResponse)(nil), "milvus.proto.internal.ShowConfigurationsResponse") + proto.RegisterType((*Rate)(nil), "milvus.proto.internal.Rate") +} + +func init() { proto.RegisterFile("internal.proto", fileDescriptor_41f4a519b878ee3b) } + +var fileDescriptor_41f4a519b878ee3b = []byte{ + // 1927 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x4b, 0x73, 0x1c, 0x49, + 0x11, 0xa6, 0xe7, 0x3d, 0x39, 0x23, 0x69, 0x54, 0x96, 0x4d, 0xfb, 0xb1, 0x6b, 0x6d, 0x43, 0x80, + 0x58, 0x62, 0xed, 0x45, 0x1b, 0xbb, 0xe6, 0x40, 0x40, 0xd8, 0x6a, 0xaf, 0x62, 0x62, 0xc7, 0x46, + 0xee, 0x31, 0x1b, 0x01, 0x97, 0x8e, 0x9a, 0xe9, 0xd4, 0xa8, 0x70, 0xbf, 0x54, 0x55, 0x6d, 0x49, + 0x3e, 0x73, 0x23, 0x82, 0x1b, 0x1c, 0x88, 0x80, 0x7f, 0xc0, 0x79, 0x83, 0x13, 0xff, 0x80, 0x13, + 0xbf, 0x66, 0x4f, 0x44, 0x3d, 0x7a, 0x5e, 0x1a, 0x2b, 0x24, 0x99, 0xc7, 0xee, 0xad, 0x33, 0xf3, + 0xab, 0xac, 0xaa, 0xcc, 0xac, 0xaf, 0xb2, 0x1a, 0xd6, 0x59, 0x2a, 0x91, 0xa7, 0x34, 0x7e, 0x90, + 0xf3, 0x4c, 0x66, 0xe4, 0x66, 0xc2, 0xe2, 0xd7, 0x85, 0x30, 0xd2, 0x83, 0xd2, 0x78, 0xa7, 0x3b, + 0xce, 0x92, 0x24, 0x4b, 0x8d, 0xfa, 0x4e, 0x57, 0x8c, 0x8f, 0x30, 0xa1, 0x46, 0xf2, 0xee, 0xc2, + 0xed, 0x7d, 0x94, 0x2f, 0x59, 0x82, 0x2f, 0xd9, 0xf8, 0xd5, 0xde, 0x11, 0x4d, 0x53, 0x8c, 0x03, + 0x3c, 0x2e, 0x50, 0x48, 0xef, 0x3d, 0xb8, 0xbb, 0x8f, 0x72, 0x28, 0xa9, 0x64, 0x42, 0xb2, 0xb1, + 0x58, 0x32, 0xdf, 0x84, 0x1b, 0xfb, 0x28, 0xfd, 0x68, 0x49, 0xfd, 0x25, 0xb4, 0x9e, 0x67, 0x11, + 0xf6, 0xd3, 0xc3, 0x8c, 0x7c, 0x06, 0x4d, 0x1a, 0x45, 0x1c, 0x85, 0x70, 0x9d, 0x6d, 0x67, 0xa7, + 0xb3, 0x7b, 0xef, 0xc1, 0xc2, 0x1a, 0xed, 0xca, 0x1e, 0x1b, 0x4c, 0x50, 0x82, 0x09, 0x81, 0x1a, + 0xcf, 0x62, 0x74, 0x2b, 0xdb, 0xce, 0x4e, 0x3b, 0xd0, 0xdf, 0xde, 0x6f, 0x01, 0xfa, 0x29, 0x93, + 0x07, 0x94, 0xd3, 0x44, 0x90, 0x5b, 0xd0, 0x48, 0xd5, 0x2c, 0xbe, 0x76, 0x5c, 0x0d, 0xac, 0x44, + 0x7c, 0xe8, 0x0a, 0x49, 0xb9, 0x0c, 0x73, 0x8d, 0x73, 0x2b, 0xdb, 0xd5, 0x9d, 0xce, 0xee, 0x07, + 0x2b, 0xa7, 0xfd, 0x02, 0xcf, 0xbe, 0xa4, 0x71, 0x81, 0x07, 0x94, 0xf1, 0xa0, 0xa3, 0x87, 0x19, + 0xef, 0xde, 0xaf, 0x01, 0x86, 0x92, 0xb3, 0x74, 0x32, 0x60, 0x42, 0xaa, 0xb9, 0x5e, 0x2b, 0x9c, + 0xda, 0x44, 0x75, 0xa7, 0x1d, 0x58, 0x89, 0x7c, 0x02, 0x0d, 0x21, 0xa9, 0x2c, 0x84, 0x5e, 0x67, + 0x67, 0xf7, 0xee, 0xca, 0x59, 0x86, 0x1a, 0x12, 0x58, 0xa8, 0xf7, 0xb7, 0x0a, 0x6c, 0x2d, 0x44, + 0xd5, 0xc6, 0x8d, 0x7c, 0x0c, 0xb5, 0x11, 0x15, 0x78, 0x61, 0xa0, 0x9e, 0x89, 0xc9, 0x13, 0x2a, + 0x30, 0xd0, 0x48, 0x15, 0xa5, 0x68, 0xd4, 0xf7, 0xf5, 0xec, 0xd5, 0x40, 0x7f, 0x13, 0x0f, 0xba, + 0xe3, 0x2c, 0x8e, 0x71, 0x2c, 0x59, 0x96, 0xf6, 0x7d, 0xb7, 0xaa, 0x6d, 0x0b, 0x3a, 0x85, 0xc9, + 0x29, 0x97, 0xcc, 0x88, 0xc2, 0xad, 0x6d, 0x57, 0x15, 0x66, 0x5e, 0x47, 0x7e, 0x04, 0x3d, 0xc9, + 0xe9, 0x6b, 0x8c, 0x43, 0xc9, 0x12, 0x14, 0x92, 0x26, 0xb9, 0x5b, 0xdf, 0x76, 0x76, 0x6a, 0xc1, + 0x86, 0xd1, 0xbf, 0x2c, 0xd5, 0xe4, 0x21, 0xdc, 0x98, 0x14, 0x94, 0xd3, 0x54, 0x22, 0xce, 0xa1, + 0x1b, 0x1a, 0x4d, 0xa6, 0xa6, 0xd9, 0x80, 0x1f, 0xc3, 0xa6, 0x82, 0x65, 0x85, 0x9c, 0x83, 0x37, + 0x35, 0xbc, 0x67, 0x0d, 0x53, 0xb0, 0xf7, 0x95, 0x03, 0x37, 0x97, 0xe2, 0x25, 0xf2, 0x2c, 0x15, + 0x78, 0x8d, 0x80, 0x5d, 0x27, 0x61, 0xe4, 0x11, 0xd4, 0xd5, 0x97, 0x70, 0xab, 0x97, 0x2d, 0x25, + 0x83, 0xf7, 0xfe, 0xea, 0x00, 0xd9, 0xe3, 0x48, 0x25, 0x3e, 0x8e, 0x19, 0x7d, 0x87, 0x3c, 0x7f, + 0x17, 0x9a, 0xd1, 0x28, 0x4c, 0x69, 0x52, 0x1e, 0x88, 0x46, 0x34, 0x7a, 0x4e, 0x13, 0x24, 0x3f, + 0x84, 0x8d, 0x59, 0x62, 0x0d, 0xa0, 0xaa, 0x01, 0xeb, 0x33, 0xb5, 0x06, 0x6e, 0x41, 0x9d, 0xaa, + 0x35, 0xb8, 0x35, 0x6d, 0x36, 0x82, 0x27, 0xa0, 0xe7, 0xf3, 0x2c, 0xff, 0x6f, 0xad, 0x6e, 0x3a, + 0x69, 0x75, 0x7e, 0xd2, 0xbf, 0x38, 0xb0, 0xf9, 0x38, 0x96, 0xc8, 0xbf, 0xa1, 0x41, 0xf9, 0x47, + 0xa5, 0xcc, 0x5a, 0x3f, 0x8d, 0xf0, 0xf4, 0xff, 0xb9, 0xc0, 0xf7, 0x00, 0x0e, 0x19, 0xc6, 0x91, + 0xc1, 0x98, 0x55, 0xb6, 0xb5, 0x46, 0x9b, 0xcb, 0xe3, 0x5f, 0xbf, 0xe0, 0xf8, 0x37, 0x56, 0x1c, + 0x7f, 0x17, 0x9a, 0xda, 0x49, 0xdf, 0xd7, 0x87, 0xae, 0x1a, 0x94, 0xa2, 0x22, 0x4f, 0x3c, 0x95, + 0x9c, 0x96, 0xe4, 0xd9, 0xba, 0x34, 0x79, 0xea, 0x61, 0x96, 0x3c, 0xff, 0x54, 0x87, 0xb5, 0x21, + 0x52, 0x3e, 0x3e, 0xba, 0x7e, 0xf0, 0xb6, 0xa0, 0xce, 0xf1, 0x78, 0xca, 0x6d, 0x46, 0x98, 0xee, + 0xb8, 0x7a, 0xc1, 0x8e, 0x6b, 0x97, 0x20, 0xbc, 0xfa, 0x0a, 0xc2, 0xeb, 0x41, 0x35, 0x12, 0xb1, + 0x0e, 0x58, 0x3b, 0x50, 0x9f, 0x8a, 0xa6, 0xf2, 0x98, 0x8e, 0xf1, 0x28, 0x8b, 0x23, 0xe4, 0xe1, + 0x84, 0x67, 0x85, 0xa1, 0xa9, 0x6e, 0xd0, 0x9b, 0x33, 0xec, 0x2b, 0x3d, 0x79, 0x04, 0xad, 0x48, + 0xc4, 0xa1, 0x3c, 0xcb, 0xd1, 0x6d, 0x6d, 0x3b, 0x3b, 0xeb, 0x6f, 0xd9, 0xa6, 0x2f, 0xe2, 0x97, + 0x67, 0x39, 0x06, 0xcd, 0xc8, 0x7c, 0x90, 0x8f, 0x61, 0x4b, 0x20, 0x67, 0x34, 0x66, 0x6f, 0x30, + 0x0a, 0xf1, 0x34, 0xe7, 0x61, 0x1e, 0xd3, 0xd4, 0x6d, 0xeb, 0x89, 0xc8, 0xcc, 0xf6, 0xf4, 0x34, + 0xe7, 0x07, 0x31, 0x4d, 0xc9, 0x0e, 0xf4, 0xb2, 0x42, 0xe6, 0x85, 0x0c, 0x75, 0xde, 0x44, 0xc8, + 0x22, 0x17, 0xf4, 0x8e, 0xd6, 0x8d, 0xfe, 0x73, 0xad, 0xee, 0x47, 0x2b, 0x49, 0xbc, 0x73, 0x25, + 0x12, 0xef, 0x5e, 0x8d, 0xc4, 0xd7, 0x56, 0x93, 0x38, 0x59, 0x87, 0x4a, 0x7a, 0xec, 0xae, 0xeb, + 0xd4, 0x54, 0xd2, 0x63, 0x95, 0x48, 0x99, 0xe5, 0xaf, 0xdc, 0x0d, 0x93, 0x48, 0xf5, 0x4d, 0xde, + 0x07, 0x48, 0x50, 0x72, 0x36, 0x56, 0x61, 0x71, 0x7b, 0x3a, 0x0f, 0x73, 0x1a, 0xf2, 0x7d, 0x58, + 0x63, 0x93, 0x34, 0xe3, 0xb8, 0xcf, 0xb3, 0x13, 0x96, 0x4e, 0xdc, 0xcd, 0x6d, 0x67, 0xa7, 0x15, + 0x2c, 0x2a, 0xc9, 0x1d, 0x68, 0x15, 0x42, 0xf5, 0x3d, 0x09, 0xba, 0x44, 0xfb, 0x98, 0xca, 0xde, + 0x3f, 0x6b, 0xb3, 0xc2, 0x14, 0x45, 0x2c, 0xc5, 0xff, 0xea, 0x0a, 0x99, 0x56, 0x73, 0x75, 0xbe, + 0x9a, 0xef, 0x43, 0xc7, 0x6c, 0xcf, 0x54, 0x4d, 0xed, 0xdc, 0x8e, 0xef, 0x43, 0x27, 0x2d, 0x92, + 0xf0, 0xb8, 0x40, 0xce, 0x50, 0xd8, 0x73, 0x0e, 0x69, 0x91, 0xbc, 0x30, 0x1a, 0x72, 0x03, 0xea, + 0x32, 0xcb, 0xc3, 0x57, 0xf6, 0x98, 0xab, 0x38, 0x7e, 0x41, 0x7e, 0x06, 0x77, 0x04, 0xd2, 0x18, + 0xa3, 0x50, 0xe0, 0x24, 0xc1, 0x54, 0xf6, 0x7d, 0x11, 0x0a, 0xbd, 0x6d, 0x8c, 0xdc, 0xa6, 0x2e, + 0x14, 0xd7, 0x20, 0x86, 0x53, 0xc0, 0xd0, 0xda, 0x55, 0x1d, 0x8c, 0x4d, 0x3f, 0xb7, 0x30, 0xac, + 0xa5, 0x1b, 0x1f, 0x32, 0x33, 0x4d, 0x07, 0xfc, 0x14, 0xdc, 0x49, 0x9c, 0x8d, 0x68, 0x1c, 0x9e, + 0x9b, 0xd5, 0x6d, 0xeb, 0xc9, 0x6e, 0x19, 0xfb, 0x70, 0x69, 0x4a, 0xb5, 0x3d, 0x11, 0xb3, 0x31, + 0x46, 0xe1, 0x28, 0xce, 0x46, 0x2e, 0xe8, 0x82, 0x07, 0xa3, 0x7a, 0x12, 0x67, 0x23, 0x55, 0xe8, + 0x16, 0xa0, 0xc2, 0x30, 0xce, 0x8a, 0x54, 0xea, 0xf2, 0xad, 0x06, 0xeb, 0x46, 0xff, 0xbc, 0x48, + 0xf6, 0x94, 0x96, 0x7c, 0x0f, 0xd6, 0x2c, 0x32, 0x3b, 0x3c, 0x14, 0x28, 0x75, 0xdd, 0x56, 0x83, + 0xae, 0x51, 0xfe, 0x52, 0xeb, 0xc8, 0x81, 0xe2, 0x5d, 0x21, 0x1f, 0x4f, 0x26, 0x1c, 0x27, 0x54, + 0x9d, 0x7b, 0x5d, 0xaf, 0x9d, 0xdd, 0x1f, 0x3c, 0x58, 0xd9, 0x38, 0x3f, 0xd8, 0x5b, 0x44, 0x07, + 0xcb, 0xc3, 0xbd, 0x63, 0xd8, 0x58, 0xc2, 0x28, 0xaa, 0xe1, 0xb6, 0x41, 0x51, 0xe5, 0x6f, 0xbb, + 0xd3, 0x05, 0x1d, 0xd9, 0x86, 0x8e, 0x40, 0xfe, 0x9a, 0x8d, 0x0d, 0xc4, 0x50, 0xdc, 0xbc, 0x4a, + 0x51, 0xb4, 0xcc, 0x24, 0x8d, 0x9f, 0xbf, 0xb0, 0x25, 0x53, 0x8a, 0xde, 0xbf, 0x6a, 0xb0, 0x11, + 0xa8, 0x12, 0xc1, 0xd7, 0xf8, 0x6d, 0xa2, 0xd7, 0xb7, 0xd1, 0x5c, 0xe3, 0x4a, 0x34, 0xd7, 0xbc, + 0x34, 0xcd, 0xb5, 0xae, 0x44, 0x73, 0xed, 0xab, 0xd1, 0x1c, 0xbc, 0x85, 0xe6, 0xb6, 0xa0, 0x1e, + 0xb3, 0x84, 0x95, 0x55, 0x6a, 0x84, 0xf3, 0xc4, 0xd5, 0x5d, 0x45, 0x5c, 0xb7, 0xa1, 0xc5, 0x84, + 0x2d, 0xf2, 0x35, 0x0d, 0x68, 0x32, 0x61, 0xaa, 0xfb, 0x29, 0xdc, 0x67, 0x12, 0xb9, 0x2e, 0xb0, + 0x10, 0x4f, 0x25, 0xa6, 0x42, 0x7d, 0x71, 0x8c, 0x8a, 0x31, 0x86, 0x9c, 0x4a, 0xb4, 0xd4, 0x7a, + 0x6f, 0x0a, 0x7b, 0x5a, 0xa2, 0x02, 0x0d, 0x0a, 0xa8, 0xc4, 0x05, 0x6a, 0xdc, 0x58, 0xa2, 0xc6, + 0xaf, 0xab, 0xf3, 0x65, 0xf5, 0x0d, 0x20, 0xc7, 0x0f, 0xa1, 0xca, 0x22, 0xd3, 0x9a, 0x75, 0x76, + 0xdd, 0x45, 0x3f, 0xf6, 0x05, 0xdb, 0xf7, 0x45, 0xa0, 0x40, 0xe4, 0x17, 0xd0, 0xb1, 0x25, 0x12, + 0x51, 0x49, 0x75, 0xf9, 0x75, 0x76, 0xdf, 0x5f, 0x39, 0x46, 0xd7, 0x8c, 0x4f, 0x25, 0x0d, 0x4c, + 0x6b, 0x25, 0xd4, 0x37, 0xf9, 0x39, 0xdc, 0x3d, 0x4f, 0x99, 0xdc, 0x86, 0x23, 0x72, 0x1b, 0xba, + 0xea, 0x6e, 0x2f, 0x73, 0x66, 0x19, 0xaf, 0x88, 0xfc, 0x04, 0xb6, 0xe6, 0x48, 0x73, 0x36, 0xb0, + 0xa9, 0x59, 0x73, 0x8e, 0x50, 0x67, 0x43, 0x2e, 0xa2, 0xcd, 0xd6, 0x85, 0xb4, 0xf9, 0x9f, 0xa7, + 0xb1, 0xaf, 0x1d, 0x68, 0x0f, 0x32, 0x1a, 0xe9, 0x86, 0xf7, 0x1a, 0x69, 0xbf, 0x07, 0xed, 0xe9, + 0xea, 0x2d, 0xa3, 0xcc, 0x14, 0xca, 0x3a, 0xed, 0x59, 0x6d, 0xa3, 0x3b, 0xd7, 0xc4, 0xce, 0x35, + 0xa3, 0xb5, 0xc5, 0x66, 0xf4, 0x3e, 0x74, 0x98, 0x5a, 0x50, 0x98, 0x53, 0x79, 0x64, 0x48, 0xa5, + 0x1d, 0x80, 0x56, 0x1d, 0x28, 0x8d, 0xea, 0x56, 0x4b, 0x80, 0xee, 0x56, 0x1b, 0x97, 0xee, 0x56, + 0xad, 0x13, 0xdd, 0xad, 0xfe, 0xce, 0x01, 0xd0, 0x1b, 0x57, 0x65, 0x79, 0xde, 0xa9, 0x73, 0x1d, + 0xa7, 0x8a, 0xed, 0xd4, 0x95, 0xc5, 0x31, 0xa6, 0x72, 0x96, 0x5b, 0x61, 0x83, 0x43, 0xd2, 0x22, + 0x09, 0x8c, 0xc9, 0xe6, 0x55, 0x78, 0x7f, 0x70, 0x00, 0x74, 0x71, 0x9a, 0x65, 0x2c, 0xd3, 0xae, + 0x73, 0x71, 0x1f, 0x5f, 0x59, 0x0c, 0xdd, 0x93, 0x32, 0x74, 0x17, 0x3c, 0x5c, 0xa7, 0xe5, 0x31, + 0xdb, 0xbc, 0x8d, 0xae, 0xfe, 0xf6, 0xfe, 0xe8, 0x40, 0xd7, 0xae, 0xce, 0x2c, 0x69, 0x21, 0xcb, + 0xce, 0x72, 0x96, 0x75, 0x33, 0x93, 0x64, 0xfc, 0x2c, 0x14, 0xec, 0x4d, 0x79, 0xa7, 0x81, 0x51, + 0x0d, 0xd9, 0x1b, 0x54, 0xfc, 0xa6, 0x43, 0x92, 0x9d, 0x88, 0xf2, 0x4e, 0x53, 0x61, 0xc8, 0x4e, + 0x84, 0xe2, 0x58, 0x8e, 0x63, 0x4c, 0x65, 0x7c, 0x16, 0x26, 0x59, 0xc4, 0x0e, 0x19, 0x46, 0xba, + 0x1a, 0x5a, 0x41, 0xaf, 0x34, 0x3c, 0xb3, 0x7a, 0xef, 0x2b, 0xf5, 0xaa, 0x36, 0x07, 0xaa, 0xfc, + 0x6d, 0xf5, 0x4c, 0x4c, 0xae, 0x51, 0xb5, 0x2a, 0xc4, 0xc6, 0x8f, 0x2a, 0x44, 0xf3, 0xa7, 0xa8, + 0x1d, 0x2c, 0xe8, 0x54, 0x4f, 0x3a, 0x65, 0x7d, 0x13, 0xc7, 0x5a, 0x30, 0xa7, 0x51, 0x2b, 0x8f, + 0xf0, 0x90, 0x16, 0xf1, 0xfc, 0xed, 0x50, 0x33, 0xb7, 0x83, 0x35, 0x2c, 0xfc, 0xc9, 0x58, 0xdf, + 0xe3, 0x18, 0x61, 0x2a, 0x19, 0x8d, 0xf5, 0xff, 0xb1, 0x79, 0x4a, 0x76, 0x16, 0x29, 0x99, 0x7c, + 0x04, 0x04, 0xd3, 0x31, 0x3f, 0xcb, 0x55, 0x05, 0xe5, 0x54, 0x88, 0x93, 0x8c, 0x47, 0xf6, 0x29, + 0xb9, 0x39, 0xb5, 0x1c, 0x58, 0x03, 0xb9, 0x05, 0x0d, 0x89, 0x29, 0x4d, 0xa5, 0x3d, 0x63, 0x56, + 0xb2, 0xf7, 0x8a, 0x28, 0x72, 0xe4, 0x36, 0xa6, 0x4d, 0x26, 0x86, 0x4a, 0x54, 0x0f, 0x51, 0x71, + 0x44, 0x77, 0x3f, 0xfd, 0x6c, 0xe6, 0xbe, 0x6e, 0x1e, 0xa2, 0x46, 0x5d, 0xfa, 0xf6, 0x9e, 0xc2, + 0xe6, 0x80, 0x09, 0x79, 0x90, 0xc5, 0x6c, 0x7c, 0x76, 0xed, 0xae, 0xc3, 0xfb, 0xbd, 0x03, 0x64, + 0xde, 0x8f, 0xfd, 0x8f, 0x33, 0xbb, 0x35, 0x9c, 0xcb, 0xdf, 0x1a, 0x1f, 0x40, 0x37, 0xd7, 0x6e, + 0x42, 0x96, 0x1e, 0x66, 0x65, 0xf6, 0x3a, 0x46, 0xa7, 0x62, 0x2b, 0xd4, 0xf3, 0x59, 0x05, 0x33, + 0xe4, 0x59, 0x8c, 0x26, 0x79, 0xed, 0xa0, 0xad, 0x34, 0x81, 0x52, 0x78, 0x13, 0xb8, 0x3d, 0x3c, + 0xca, 0x4e, 0xf6, 0xb2, 0xf4, 0x90, 0x4d, 0x0a, 0x73, 0x6d, 0xbe, 0xc3, 0xff, 0x08, 0x17, 0x9a, + 0x39, 0x95, 0xea, 0x4c, 0xd9, 0x1c, 0x95, 0xa2, 0xf7, 0x67, 0x07, 0xee, 0xac, 0x9a, 0xe9, 0x5d, + 0xb6, 0xbf, 0x0f, 0x6b, 0x63, 0xe3, 0xce, 0x78, 0xbb, 0xfc, 0x7f, 0xce, 0xc5, 0x71, 0xde, 0x53, + 0xa8, 0xe9, 0xe6, 0xe0, 0x21, 0x54, 0xb8, 0xd4, 0x2b, 0x58, 0xdf, 0xbd, 0xff, 0x16, 0xa6, 0x50, + 0x40, 0xfd, 0x78, 0xad, 0x70, 0x49, 0xba, 0xe0, 0x70, 0xbd, 0x53, 0x27, 0x70, 0xf8, 0x87, 0x7f, + 0x77, 0xa0, 0x55, 0x9a, 0xc9, 0x26, 0xac, 0xf9, 0xfe, 0x60, 0x6f, 0xca, 0x55, 0xbd, 0xef, 0x90, + 0x1e, 0x74, 0x7d, 0x7f, 0x70, 0x50, 0x76, 0x84, 0x3d, 0x87, 0x74, 0xa1, 0xe5, 0xfb, 0x03, 0x4d, + 0x3e, 0xbd, 0x8a, 0x95, 0x3e, 0x8f, 0x0b, 0x71, 0xd4, 0xab, 0x4e, 0x1d, 0x24, 0x39, 0x35, 0x0e, + 0x6a, 0x64, 0x0d, 0xda, 0xfe, 0xb3, 0x41, 0x3f, 0x15, 0xc8, 0x65, 0xaf, 0x6e, 0x45, 0x1f, 0x63, + 0x94, 0xd8, 0x6b, 0x90, 0x0d, 0xe8, 0xf8, 0xcf, 0x06, 0x4f, 0x8a, 0xf8, 0x95, 0xba, 0xc7, 0x7a, + 0x4d, 0x6d, 0x7f, 0x31, 0x30, 0x8f, 0x94, 0x5e, 0x4b, 0xbb, 0x7f, 0x31, 0x50, 0xcf, 0xa6, 0xb3, + 0x5e, 0xdb, 0x0e, 0xfe, 0x55, 0xae, 0x7d, 0xc1, 0x93, 0x47, 0xbf, 0xf9, 0x74, 0xc2, 0xe4, 0x51, + 0x31, 0x52, 0xf1, 0x7a, 0x68, 0xb6, 0xfe, 0x11, 0xcb, 0xec, 0xd7, 0xc3, 0x72, 0xfb, 0x0f, 0x75, + 0x34, 0xa6, 0x62, 0x3e, 0x1a, 0x35, 0xb4, 0xe6, 0x93, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0xc1, + 0x18, 0x48, 0x84, 0x88, 0x17, 0x00, 0x00, +} diff --git a/internal/proxy/lb_policy.go b/internal/proxy/lb_policy.go index 417a2221fd..12b979d92c 100644 --- a/internal/proxy/lb_policy.go +++ b/internal/proxy/lb_policy.go @@ -32,7 +32,7 @@ import ( "github.com/milvus-io/milvus/pkg/util/typeutil" ) -type executeFunc func(context.Context, UniqueID, types.QueryNodeClient, ...string) error +type executeFunc func(context.Context, UniqueID, types.QueryNodeClient, string) error type ChannelWorkload struct { db string diff --git a/internal/proxy/lb_policy_test.go b/internal/proxy/lb_policy_test.go index 19da3d6b0d..342008f6de 100644 --- a/internal/proxy/lb_policy_test.go +++ b/internal/proxy/lb_policy_test.go @@ -248,7 +248,7 @@ func (s *LBPolicySuite) TestExecuteWithRetry() { channel: s.channels[0], shardLeaders: s.nodes, nq: 1, - exec: func(ctx context.Context, ui UniqueID, qn types.QueryNodeClient, s ...string) error { + exec: func(ctx context.Context, ui UniqueID, qn types.QueryNodeClient, channel string) error { return nil }, retryTimes: 1, @@ -265,7 +265,7 @@ func (s *LBPolicySuite) TestExecuteWithRetry() { channel: s.channels[0], shardLeaders: s.nodes, nq: 1, - exec: func(ctx context.Context, ui UniqueID, qn types.QueryNodeClient, s ...string) error { + exec: func(ctx context.Context, ui UniqueID, qn types.QueryNodeClient, channel string) error { return nil }, retryTimes: 1, @@ -285,7 +285,7 @@ func (s *LBPolicySuite) TestExecuteWithRetry() { channel: s.channels[0], shardLeaders: s.nodes, nq: 1, - exec: func(ctx context.Context, ui UniqueID, qn types.QueryNodeClient, s ...string) error { + exec: func(ctx context.Context, ui UniqueID, qn types.QueryNodeClient, channel string) error { return nil }, retryTimes: 1, @@ -303,7 +303,7 @@ func (s *LBPolicySuite) TestExecuteWithRetry() { channel: s.channels[0], shardLeaders: s.nodes, nq: 1, - exec: func(ctx context.Context, ui UniqueID, qn types.QueryNodeClient, s ...string) error { + exec: func(ctx context.Context, ui UniqueID, qn types.QueryNodeClient, channel string) error { return nil }, retryTimes: 2, @@ -324,7 +324,7 @@ func (s *LBPolicySuite) TestExecuteWithRetry() { channel: s.channels[0], shardLeaders: s.nodes, nq: 1, - exec: func(ctx context.Context, ui UniqueID, qn types.QueryNodeClient, s ...string) error { + exec: func(ctx context.Context, ui UniqueID, qn types.QueryNodeClient, channel string) error { counter++ if counter == 1 { return errors.New("fake error") @@ -349,7 +349,7 @@ func (s *LBPolicySuite) TestExecuteWithRetry() { channel: s.channels[0], shardLeaders: s.nodes, nq: 1, - exec: func(ctx context.Context, ui UniqueID, qn types.QueryNodeClient, s ...string) error { + exec: func(ctx context.Context, ui UniqueID, qn types.QueryNodeClient, channel string) error { _, err := qn.Search(ctx, nil) return err }, @@ -370,7 +370,7 @@ func (s *LBPolicySuite) TestExecute() { collectionName: s.collectionName, collectionID: s.collectionID, nq: 1, - exec: func(ctx context.Context, ui UniqueID, qn types.QueryNodeClient, s ...string) error { + exec: func(ctx context.Context, ui UniqueID, qn types.QueryNodeClient, channel string) error { return nil }, }) @@ -383,7 +383,7 @@ func (s *LBPolicySuite) TestExecute() { collectionName: s.collectionName, collectionID: s.collectionID, nq: 1, - exec: func(ctx context.Context, ui UniqueID, qn types.QueryNodeClient, s ...string) error { + exec: func(ctx context.Context, ui UniqueID, qn types.QueryNodeClient, channel string) error { // succeed in first execute if counter.Add(1) == 1 { return nil @@ -404,7 +404,7 @@ func (s *LBPolicySuite) TestExecute() { collectionName: s.collectionName, collectionID: s.collectionID, nq: 1, - exec: func(ctx context.Context, ui UniqueID, qn types.QueryNodeClient, s ...string) error { + exec: func(ctx context.Context, ui UniqueID, qn types.QueryNodeClient, channel string) error { return nil }, }) diff --git a/internal/proxy/task_delete.go b/internal/proxy/task_delete.go index 2a0df673d8..fda28b7513 100644 --- a/internal/proxy/task_delete.go +++ b/internal/proxy/task_delete.go @@ -350,7 +350,7 @@ func (dr *deleteRunner) produce(ctx context.Context, primaryKeys *schemapb.IDs) // getStreamingQueryAndDelteFunc return query function used by LBPolicy // make sure it concurrent safe func (dr *deleteRunner) getStreamingQueryAndDelteFunc(plan *planpb.PlanNode) executeFunc { - return func(ctx context.Context, nodeID int64, qn types.QueryNodeClient, channelIDs ...string) error { + return func(ctx context.Context, nodeID int64, qn types.QueryNodeClient, channel string) error { var partitionIDs []int64 // optimize query when partitionKey on @@ -375,7 +375,7 @@ func (dr *deleteRunner) getStreamingQueryAndDelteFunc(plan *planpb.PlanNode) exe log := log.Ctx(ctx).With( zap.Int64("collectionID", dr.collectionID), zap.Int64s("partitionIDs", partitionIDs), - zap.Strings("channels", channelIDs), + zap.String("channel", channel), zap.Int64("nodeID", nodeID)) // set plan @@ -405,7 +405,7 @@ func (dr *deleteRunner) getStreamingQueryAndDelteFunc(plan *planpb.PlanNode) exe OutputFieldsId: outputFieldIDs, GuaranteeTimestamp: parseGuaranteeTsFromConsistency(dr.ts, dr.ts, dr.req.GetConsistencyLevel()), }, - DmlChannels: channelIDs, + DmlChannels: []string{channel}, Scope: querypb.DataScope_All, } diff --git a/internal/proxy/task_delete_test.go b/internal/proxy/task_delete_test.go index 816b6aaa90..ca40dcea58 100644 --- a/internal/proxy/task_delete_test.go +++ b/internal/proxy/task_delete_test.go @@ -546,7 +546,7 @@ func TestDeleteRunner_Run(t *testing.T) { }, } lb.EXPECT().Execute(mock.Anything, mock.Anything).Call.Return(func(ctx context.Context, workload CollectionWorkLoad) error { - return workload.exec(ctx, 1, qn) + return workload.exec(ctx, 1, qn, "") }) qn.EXPECT().QueryStream(mock.Anything, mock.Anything).Return(nil, errors.New("mock error")) @@ -591,7 +591,7 @@ func TestDeleteRunner_Run(t *testing.T) { stream.EXPECT().Produce(mock.Anything).Return(nil) lb.EXPECT().Execute(mock.Anything, mock.Anything).Call.Return(func(ctx context.Context, workload CollectionWorkLoad) error { - return workload.exec(ctx, 1, qn) + return workload.exec(ctx, 1, qn, "") }) qn.EXPECT().QueryStream(mock.Anything, mock.Anything).Call.Return( @@ -654,7 +654,7 @@ func TestDeleteRunner_Run(t *testing.T) { mockMgr.EXPECT().getOrCreateDmlStream(mock.Anything).Return(stream, nil) mockMgr.EXPECT().getChannels(collectionID).Return(channels, nil) lb.EXPECT().Execute(mock.Anything, mock.Anything).Call.Return(func(ctx context.Context, workload CollectionWorkLoad) error { - return workload.exec(ctx, 1, qn) + return workload.exec(ctx, 1, qn, "") }) qn.EXPECT().QueryStream(mock.Anything, mock.Anything).Call.Return( @@ -716,7 +716,7 @@ func TestDeleteRunner_Run(t *testing.T) { mockMgr.EXPECT().getOrCreateDmlStream(mock.Anything).Return(stream, nil) mockMgr.EXPECT().getChannels(collectionID).Return(channels, nil) lb.EXPECT().Execute(mock.Anything, mock.Anything).Call.Return(func(ctx context.Context, workload CollectionWorkLoad) error { - return workload.exec(ctx, 1, qn) + return workload.exec(ctx, 1, qn, "") }) qn.EXPECT().QueryStream(mock.Anything, mock.Anything).Call.Return( @@ -797,7 +797,7 @@ func TestDeleteRunner_Run(t *testing.T) { mockMgr.EXPECT().getOrCreateDmlStream(mock.Anything).Return(stream, nil) mockMgr.EXPECT().getChannels(collectionID).Return(channels, nil) lb.EXPECT().Execute(mock.Anything, mock.Anything).Call.Return(func(ctx context.Context, workload CollectionWorkLoad) error { - return workload.exec(ctx, 1, qn) + return workload.exec(ctx, 1, qn, "") }) qn.EXPECT().QueryStream(mock.Anything, mock.Anything).Call.Return( @@ -899,7 +899,7 @@ func TestDeleteRunner_StreamingQueryAndDelteFunc(t *testing.T) { qn := mocks.NewMockQueryNodeClient(t) // witho out plan queryFunc := dr.getStreamingQueryAndDelteFunc(nil) - assert.Error(t, queryFunc(ctx, 1, qn)) + assert.Error(t, queryFunc(ctx, 1, qn, "")) }) t.Run("partitionKey mode get meta failed", func(t *testing.T) { @@ -938,7 +938,7 @@ func TestDeleteRunner_StreamingQueryAndDelteFunc(t *testing.T) { plan, err := planparserv2.CreateRetrievePlan(dr.schema.CollectionSchema, dr.req.Expr) assert.NoError(t, err) queryFunc := dr.getStreamingQueryAndDelteFunc(plan) - assert.Error(t, queryFunc(ctx, 1, qn)) + assert.Error(t, queryFunc(ctx, 1, qn, "")) }) t.Run("partitionKey mode get partition ID failed", func(t *testing.T) { @@ -981,6 +981,6 @@ func TestDeleteRunner_StreamingQueryAndDelteFunc(t *testing.T) { plan, err := planparserv2.CreateRetrievePlan(dr.schema.CollectionSchema, dr.req.Expr) assert.NoError(t, err) queryFunc := dr.getStreamingQueryAndDelteFunc(plan) - assert.Error(t, queryFunc(ctx, 1, qn)) + assert.Error(t, queryFunc(ctx, 1, qn, "")) }) } diff --git a/internal/proxy/task_query.go b/internal/proxy/task_query.go index 5cbd2b0850..dc823ec690 100644 --- a/internal/proxy/task_query.go +++ b/internal/proxy/task_query.go @@ -61,6 +61,8 @@ type queryTask struct { plan *planpb.PlanNode partitionKeyMode bool lb LBPolicy + channelsMvcc map[string]Timestamp + fastSkip bool } type queryParams struct { @@ -466,19 +468,33 @@ func (t *queryTask) PostExecute(ctx context.Context) error { return nil } -func (t *queryTask) queryShard(ctx context.Context, nodeID int64, qn types.QueryNodeClient, channelIDs ...string) error { +func (t *queryTask) queryShard(ctx context.Context, nodeID int64, qn types.QueryNodeClient, channel string) error { + needOverrideMvcc := false + mvccTs := t.MvccTimestamp + if len(t.channelsMvcc) > 0 { + mvccTs, needOverrideMvcc = t.channelsMvcc[channel] + // In fast mode, if there is no corresponding channel in channelsMvcc, quickly skip this query. + if !needOverrideMvcc && t.fastSkip { + return nil + } + } + retrieveReq := typeutil.Clone(t.RetrieveRequest) retrieveReq.GetBase().TargetID = nodeID + if needOverrideMvcc && mvccTs > 0 { + retrieveReq.MvccTimestamp = mvccTs + } + req := &querypb.QueryRequest{ Req: retrieveReq, - DmlChannels: channelIDs, + DmlChannels: []string{channel}, Scope: querypb.DataScope_All, } log := log.Ctx(ctx).With(zap.Int64("collection", t.GetCollectionID()), zap.Int64s("partitionIDs", t.GetPartitionIDs()), zap.Int64("nodeID", nodeID), - zap.Strings("channels", channelIDs)) + zap.String("channel", channel)) result, err := qn.Query(ctx, req) if err != nil { diff --git a/internal/proxy/task_search.go b/internal/proxy/task_search.go index 556532159d..718091641a 100644 --- a/internal/proxy/task_search.go +++ b/internal/proxy/task_search.go @@ -63,9 +63,10 @@ type searchTask struct { offset int64 resultBuf *typeutil.ConcurrentSet[*internalpb.SearchResults] - qc types.QueryCoordClient - node types.ProxyComponent - lb LBPolicy + qc types.QueryCoordClient + node types.ProxyComponent + lb LBPolicy + queryChannelsTs map[string]Timestamp } func getPartitionIDs(ctx context.Context, dbName string, collectionName string, partitionNames []string) (partitionIDs []UniqueID, err error) { @@ -456,6 +457,13 @@ func (t *searchTask) PostExecute(ctx context.Context) error { return err } + t.queryChannelsTs = make(map[string]uint64) + for _, r := range toReduceResults { + for ch, ts := range r.GetChannelsMvcc() { + t.queryChannelsTs[ch] = ts + } + } + if len(toReduceResults) >= 1 { MetricType = toReduceResults[0].GetMetricType() } @@ -513,20 +521,20 @@ func (t *searchTask) PostExecute(ctx context.Context) error { return nil } -func (t *searchTask) searchShard(ctx context.Context, nodeID int64, qn types.QueryNodeClient, channelIDs ...string) error { +func (t *searchTask) searchShard(ctx context.Context, nodeID int64, qn types.QueryNodeClient, channel string) error { searchReq := typeutil.Clone(t.SearchRequest) searchReq.GetBase().TargetID = nodeID req := &querypb.SearchRequest{ Req: searchReq, - DmlChannels: channelIDs, + DmlChannels: []string{channel}, Scope: querypb.DataScope_All, - TotalChannelNum: int32(len(channelIDs)), + TotalChannelNum: int32(1), } log := log.Ctx(ctx).With(zap.Int64("collection", t.GetCollectionID()), zap.Int64s("partitionIDs", t.GetPartitionIDs()), zap.Int64("nodeID", nodeID), - zap.Strings("channels", channelIDs)) + zap.String("channel", channel)) var result *internalpb.SearchResults var err error @@ -593,6 +601,10 @@ func (t *searchTask) Requery() error { GuaranteeTimestamp: t.request.GetGuaranteeTimestamp(), QueryParams: t.request.GetSearchParams(), } + channelsMvcc := make(map[string]Timestamp) + for k, v := range t.queryChannelsTs { + channelsMvcc[k] = v + } qt := &queryTask{ ctx: t.ctx, Condition: NewTaskCondition(t.ctx), @@ -603,10 +615,12 @@ func (t *searchTask) Requery() error { ), ReqID: paramtable.GetNodeID(), }, - request: queryReq, - plan: plan, - qc: t.node.(*Proxy).queryCoord, - lb: t.node.(*Proxy).lbPolicy, + request: queryReq, + plan: plan, + qc: t.node.(*Proxy).queryCoord, + lb: t.node.(*Proxy).lbPolicy, + channelsMvcc: channelsMvcc, + fastSkip: true, } queryResult, err := t.node.(*Proxy).query(t.ctx, qt) if err != nil { @@ -823,7 +837,7 @@ func reduceSearchResultData(ctx context.Context, subSearchResultData []*schemapb zap.Int64("nq", sData.NumQueries), zap.Int64("topk", sData.TopK), zap.Int("length of pks", pkLength), - zap.Any("length of FieldsData", len(sData.FieldsData))) + zap.Int("length of FieldsData", len(sData.FieldsData))) if err := checkSearchResultData(sData, nq, topk); err != nil { log.Ctx(ctx).Warn("invalid search results", zap.Error(err)) return ret, err @@ -850,6 +864,7 @@ func reduceSearchResultData(ctx context.Context, subSearchResultData []*schemapb var retSize int64 maxOutputSize := paramtable.Get().QuotaConfig.MaxOutputSize.GetAsInt64() + // reducing nq * topk results for i := int64(0); i < nq; i++ { var ( diff --git a/internal/proxy/task_search_test.go b/internal/proxy/task_search_test.go index e0b836b3a6..a6efc4d0c1 100644 --- a/internal/proxy/task_search_test.go +++ b/internal/proxy/task_search_test.go @@ -1985,7 +1985,7 @@ func TestSearchTask_Requery(t *testing.T) { lb := NewMockLBPolicy(t) lb.EXPECT().Execute(mock.Anything, mock.Anything).Run(func(ctx context.Context, workload CollectionWorkLoad) { - err = workload.exec(ctx, 0, qn) + err = workload.exec(ctx, 0, qn, "") assert.NoError(t, err) }).Return(nil) lb.EXPECT().UpdateCostMetrics(mock.Anything, mock.Anything).Return() @@ -2065,7 +2065,7 @@ func TestSearchTask_Requery(t *testing.T) { lb := NewMockLBPolicy(t) lb.EXPECT().Execute(mock.Anything, mock.Anything).Run(func(ctx context.Context, workload CollectionWorkLoad) { - _ = workload.exec(ctx, 0, qn) + _ = workload.exec(ctx, 0, qn, "") }).Return(fmt.Errorf("mock err 1")) node.lbPolicy = lb @@ -2099,7 +2099,7 @@ func TestSearchTask_Requery(t *testing.T) { lb := NewMockLBPolicy(t) lb.EXPECT().Execute(mock.Anything, mock.Anything).Run(func(ctx context.Context, workload CollectionWorkLoad) { - _ = workload.exec(ctx, 0, qn) + _ = workload.exec(ctx, 0, qn, "") }).Return(fmt.Errorf("mock err 1")) node.lbPolicy = lb diff --git a/internal/proxy/task_statistic.go b/internal/proxy/task_statistic.go index 8a642be82b..ef43850693 100644 --- a/internal/proxy/task_statistic.go +++ b/internal/proxy/task_statistic.go @@ -273,19 +273,19 @@ func (g *getStatisticsTask) getStatisticsFromQueryNode(ctx context.Context) erro return nil } -func (g *getStatisticsTask) getStatisticsShard(ctx context.Context, nodeID int64, qn types.QueryNodeClient, channelIDs ...string) error { +func (g *getStatisticsTask) getStatisticsShard(ctx context.Context, nodeID int64, qn types.QueryNodeClient, channel string) error { nodeReq := proto.Clone(g.GetStatisticsRequest).(*internalpb.GetStatisticsRequest) nodeReq.Base.TargetID = nodeID req := &querypb.GetStatisticsRequest{ Req: nodeReq, - DmlChannels: channelIDs, + DmlChannels: []string{channel}, Scope: querypb.DataScope_All, } result, err := qn.GetStatistics(ctx, req) if err != nil { log.Warn("QueryNode statistic return error", zap.Int64("nodeID", nodeID), - zap.Strings("channels", channelIDs), + zap.String("channel", channel), zap.Error(err)) globalMetaCache.DeprecateShardCache(g.request.GetDbName(), g.collectionName) return err @@ -293,7 +293,7 @@ func (g *getStatisticsTask) getStatisticsShard(ctx context.Context, nodeID int64 if result.GetStatus().GetErrorCode() == commonpb.ErrorCode_NotShardLeader { log.Warn("QueryNode is not shardLeader", zap.Int64("nodeID", nodeID), - zap.Strings("channels", channelIDs)) + zap.String("channel", channel)) globalMetaCache.DeprecateShardCache(g.request.GetDbName(), g.collectionName) return errInvalidShardLeaders } diff --git a/internal/querynodev2/delegator/delegator.go b/internal/querynodev2/delegator/delegator.go index 0a3f6cbfe7..3cd025996f 100644 --- a/internal/querynodev2/delegator/delegator.go +++ b/internal/querynodev2/delegator/delegator.go @@ -200,11 +200,14 @@ func (sd *shardDelegator) Search(ctx context.Context, req *querypb.SearchRequest // wait tsafe waitTr := timerecord.NewTimeRecorder("wait tSafe") - err := sd.waitTSafe(ctx, req.Req.GuaranteeTimestamp) + tSafe, err := sd.waitTSafe(ctx, req.Req.GuaranteeTimestamp) if err != nil { log.Warn("delegator search failed to wait tsafe", zap.Error(err)) return nil, err } + if req.GetReq().GetMvccTimestamp() == 0 { + req.Req.MvccTimestamp = tSafe + } metrics.QueryNodeSQLatencyWaitTSafe.WithLabelValues( fmt.Sprint(paramtable.GetNodeID()), metrics.SearchLabel). Observe(float64(waitTr.ElapseSpan().Milliseconds())) @@ -275,11 +278,14 @@ func (sd *shardDelegator) QueryStream(ctx context.Context, req *querypb.QueryReq // wait tsafe waitTr := timerecord.NewTimeRecorder("wait tSafe") - err := sd.waitTSafe(ctx, req.Req.GuaranteeTimestamp) + tSafe, err := sd.waitTSafe(ctx, req.Req.GuaranteeTimestamp) if err != nil { log.Warn("delegator query failed to wait tsafe", zap.Error(err)) return err } + if req.GetReq().GetMvccTimestamp() == 0 { + req.Req.MvccTimestamp = tSafe + } metrics.QueryNodeSQLatencyWaitTSafe.WithLabelValues( fmt.Sprint(paramtable.GetNodeID()), metrics.QueryLabel). Observe(float64(waitTr.ElapseSpan().Milliseconds())) @@ -343,11 +349,14 @@ func (sd *shardDelegator) Query(ctx context.Context, req *querypb.QueryRequest) // wait tsafe waitTr := timerecord.NewTimeRecorder("wait tSafe") - err := sd.waitTSafe(ctx, req.Req.GuaranteeTimestamp) + tSafe, err := sd.waitTSafe(ctx, req.Req.GuaranteeTimestamp) if err != nil { log.Warn("delegator query failed to wait tsafe", zap.Error(err)) return nil, err } + if req.GetReq().GetMvccTimestamp() == 0 { + req.Req.MvccTimestamp = tSafe + } metrics.QueryNodeSQLatencyWaitTSafe.WithLabelValues( fmt.Sprint(paramtable.GetNodeID()), metrics.QueryLabel). Observe(float64(waitTr.ElapseSpan().Milliseconds())) @@ -406,7 +415,7 @@ func (sd *shardDelegator) GetStatistics(ctx context.Context, req *querypb.GetSta } // wait tsafe - err := sd.waitTSafe(ctx, req.Req.GuaranteeTimestamp) + _, err := sd.waitTSafe(ctx, req.Req.GuaranteeTimestamp) if err != nil { log.Warn("delegator GetStatistics failed to wait tsafe", zap.Error(err)) return nil, err @@ -547,14 +556,15 @@ func executeSubTasks[T any, R interface { } // waitTSafe returns when tsafe listener notifies a timestamp which meet the guarantee ts. -func (sd *shardDelegator) waitTSafe(ctx context.Context, ts uint64) error { +func (sd *shardDelegator) waitTSafe(ctx context.Context, ts uint64) (uint64, error) { log := sd.getLogger(ctx) // already safe to search - if sd.latestTsafe.Load() >= ts { - return nil + latestTSafe := sd.latestTsafe.Load() + if latestTSafe >= ts { + return latestTSafe, nil } // check lag duration too large - st, _ := tsoutil.ParseTS(sd.latestTsafe.Load()) + st, _ := tsoutil.ParseTS(latestTSafe) gt, _ := tsoutil.ParseTS(ts) lag := gt.Sub(st) maxLag := paramtable.Get().QueryNodeCfg.MaxTimestampLag.GetAsDuration(time.Second) @@ -565,7 +575,7 @@ func (sd *shardDelegator) waitTSafe(ctx context.Context, ts uint64) error { zap.Duration("lag", lag), zap.Duration("maxTsLag", maxLag), ) - return WrapErrTsLagTooLarge(lag, maxLag) + return 0, WrapErrTsLagTooLarge(lag, maxLag) } ch := make(chan struct{}) @@ -587,12 +597,12 @@ func (sd *shardDelegator) waitTSafe(ctx context.Context, ts uint64) error { case <-ctx.Done(): // notify wait goroutine to quit sd.tsCond.Broadcast() - return ctx.Err() + return 0, ctx.Err() case <-ch: if !sd.Serviceable() { - return merr.WrapErrChannelNotAvailable(sd.vchannelName, "delegator closed during wait tsafe") + return 0, merr.WrapErrChannelNotAvailable(sd.vchannelName, "delegator closed during wait tsafe") } - return nil + return sd.latestTsafe.Load(), nil } } } diff --git a/internal/querynodev2/handlers.go b/internal/querynodev2/handlers.go index 0e5bfe754b..7d01154d9f 100644 --- a/internal/querynodev2/handlers.go +++ b/internal/querynodev2/handlers.go @@ -359,7 +359,6 @@ func (node *QueryNode) searchChannel(ctx context.Context, req *querypb.SearchReq metrics.QueryNodeSQCount.WithLabelValues(fmt.Sprint(paramtable.GetNodeID()), metrics.SearchLabel, metrics.SuccessLabel, metrics.Leader).Inc() metrics.QueryNodeSearchNQ.WithLabelValues(fmt.Sprint(paramtable.GetNodeID())).Observe(float64(req.Req.GetNq())) metrics.QueryNodeSearchTopK.WithLabelValues(fmt.Sprint(paramtable.GetNodeID())).Observe(float64(req.Req.GetTopk())) - return resp, nil } diff --git a/internal/querynodev2/segments/plan.go b/internal/querynodev2/segments/plan.go index edc01d27e0..f73ccfaeb2 100644 --- a/internal/querynodev2/segments/plan.go +++ b/internal/querynodev2/segments/plan.go @@ -90,6 +90,7 @@ type SearchRequest struct { cPlaceholderGroup C.CPlaceholderGroup msgID UniqueID searchFieldID UniqueID + mvccTimestamp Timestamp } func NewSearchRequest(ctx context.Context, collection *Collection, req *querypb.SearchRequest, placeholderGrp []byte) (*SearchRequest, error) { @@ -129,6 +130,7 @@ func NewSearchRequest(ctx context.Context, collection *Collection, req *querypb. cPlaceholderGroup: cPlaceholderGroup, msgID: req.GetReq().GetBase().GetMsgID(), searchFieldID: int64(fieldID), + mvccTimestamp: req.GetReq().GetMvccTimestamp(), } return ret, nil diff --git a/internal/querynodev2/segments/reduce_test.go b/internal/querynodev2/segments/reduce_test.go index 4e2efddfa6..275e0a358d 100644 --- a/internal/querynodev2/segments/reduce_test.go +++ b/internal/querynodev2/segments/reduce_test.go @@ -34,6 +34,7 @@ import ( "github.com/milvus-io/milvus/pkg/common" "github.com/milvus-io/milvus/pkg/util/funcutil" "github.com/milvus-io/milvus/pkg/util/paramtable" + "github.com/milvus-io/milvus/pkg/util/typeutil" ) type ReduceSuite struct { @@ -166,6 +167,7 @@ func (suite *ReduceSuite) TestReduceAllFunc() { plan, err := createSearchPlanByExpr(context.Background(), suite.collection, serializedPlan, "") suite.NoError(err) searchReq, err := parseSearchRequest(context.Background(), plan, placeGroupByte) + searchReq.mvccTimestamp = typeutil.MaxTimestamp suite.NoError(err) defer searchReq.Delete() diff --git a/internal/querynodev2/segments/result.go b/internal/querynodev2/segments/result.go index 72369266d7..20fb5b8ff9 100644 --- a/internal/querynodev2/segments/result.go +++ b/internal/querynodev2/segments/result.go @@ -49,6 +49,12 @@ func ReduceSearchResults(ctx context.Context, results []*internalpb.SearchResult return results[0], nil } + channelsMvcc := make(map[string]uint64) + for _, r := range results { + for ch, ts := range r.GetChannelsMvcc() { + channelsMvcc[ch] = ts + } + } log := log.Ctx(ctx) searchResultData, err := DecodeSearchResults(results) @@ -88,7 +94,7 @@ func ReduceSearchResults(ctx context.Context, results []*internalpb.SearchResult return nil, false }) searchResults.CostAggregation = mergeRequestCost(requestCosts) - + searchResults.ChannelsMvcc = channelsMvcc return searchResults, nil } diff --git a/internal/querynodev2/segments/segment.go b/internal/querynodev2/segments/segment.go index 2616f203a4..27d8fc4da0 100644 --- a/internal/querynodev2/segments/segment.go +++ b/internal/querynodev2/segments/segment.go @@ -372,6 +372,7 @@ func (s *LocalSegment) Search(ctx context.Context, searchReq *SearchRequest) (*S searchReq.plan.cSearchPlan, searchReq.cPlaceholderGroup, traceCtx, + C.uint64_t(searchReq.mvccTimestamp), &searchResult.cSearchResult, ) metrics.QueryNodeSQSegmentLatencyInCore.WithLabelValues(fmt.Sprint(paramtable.GetNodeID()), metrics.SearchLabel).Observe(float64(tr.ElapseSpan().Milliseconds())) diff --git a/internal/querynodev2/services.go b/internal/querynodev2/services.go index facdbd28ef..827e50671d 100644 --- a/internal/querynodev2/services.go +++ b/internal/querynodev2/services.go @@ -658,8 +658,13 @@ func (node *QueryNode) SearchSegments(ctx context.Context, req *querypb.SearchRe zap.String("channel", channel), zap.String("scope", req.GetScope().String()), ) - - resp := &internalpb.SearchResults{} + channelsMvcc := make(map[string]uint64) + for _, ch := range req.GetDmlChannels() { + channelsMvcc[ch] = req.GetReq().GetMvccTimestamp() + } + resp := &internalpb.SearchResults{ + ChannelsMvcc: channelsMvcc, + } if err := node.lifetime.Add(merr.IsHealthy); err != nil { resp.Status = merr.Status(err) return resp, nil @@ -790,7 +795,6 @@ func (node *QueryNode) Search(ctx context.Context, req *querypb.SearchRequest) ( Scope: req.Scope, TotalChannelNum: req.TotalChannelNum, } - runningGp.Go(func() error { ret, err := node.searchChannel(runningCtx, req, ch) mu.Lock() @@ -889,7 +893,7 @@ func (node *QueryNode) QuerySegments(ctx context.Context, req *querypb.QueryRequ return resp, nil } - tr.CtxElapse(ctx, fmt.Sprintf("do query done, traceID = %s, fromSharedLeader = %t, vChannel = %s, segmentIDs = %v", + tr.CtxElapse(ctx, fmt.Sprintf("do query done, traceID = %s, fromShardLeader = %t, vChannel = %s, segmentIDs = %v", traceID, req.GetFromShardLeader(), channel, @@ -1101,7 +1105,7 @@ func (node *QueryNode) QueryStreamSegments(req *querypb.QueryRequest, srv queryp return nil } - tr.CtxElapse(ctx, fmt.Sprintf("do query done, traceID = %s, fromSharedLeader = %t, vChannel = %s, segmentIDs = %v", + tr.CtxElapse(ctx, fmt.Sprintf("do query done, traceID = %s, fromShardLeader = %t, vChannel = %s, segmentIDs = %v", traceID, req.GetFromShardLeader(), channel, diff --git a/internal/querynodev2/services_test.go b/internal/querynodev2/services_test.go index 420d9666e0..0add172c36 100644 --- a/internal/querynodev2/services_test.go +++ b/internal/querynodev2/services_test.go @@ -1149,6 +1149,7 @@ func (suite *ServiceSuite) genCSearchRequest(nq int64, indexType string, schema PlaceholderGroup: placeHolder, DslType: commonpb.DslType_BoolExprV1, Nq: nq, + MvccTimestamp: typeutil.MaxTimestamp, }, nil } diff --git a/internal/querynodev2/tasks/task.go b/internal/querynodev2/tasks/task.go index 9fbf12545a..83498157a2 100644 --- a/internal/querynodev2/tasks/task.go +++ b/internal/querynodev2/tasks/task.go @@ -257,6 +257,7 @@ func (t *SearchTask) Merge(other *SearchTask) bool { // Check mergeable if t.req.GetReq().GetDbID() != other.req.GetReq().GetDbID() || t.req.GetReq().GetCollectionID() != other.req.GetReq().GetCollectionID() || + t.req.GetReq().GetMvccTimestamp() != other.req.GetReq().GetMvccTimestamp() || t.req.GetReq().GetDslType() != other.req.GetReq().GetDslType() || t.req.GetDmlChannels()[0] != other.req.GetDmlChannels()[0] || nq+otherNq > paramtable.Get().QueryNodeCfg.MaxGroupNQ.GetAsInt64() || @@ -300,6 +301,13 @@ func (t *SearchTask) Wait() error { } func (t *SearchTask) Result() *internalpb.SearchResults { + if t.result != nil { + channelsMvcc := make(map[string]uint64) + for _, ch := range t.req.GetDmlChannels() { + channelsMvcc[ch] = t.req.GetReq().GetMvccTimestamp() + } + t.result.ChannelsMvcc = channelsMvcc + } return t.result }