diff --git a/CHANGELOG.md b/CHANGELOG.md index adfacd24a0..0aa2e5a72a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ Please mark all changes in change log and use the issue from GitHub - \#3668 Docker exit without any logs - \#3672 0.11.0 docker image is 200M larger due to the un-expected installation of openblas - \#3689 Client get stuck if drop collection during creating index +- \#3734 GET_PAGE_ENTITY sometimes failed in test_web ## Feature - \#2319 Redo metadata to support MVCC diff --git a/core/src/db/engine/ExecutionEngineImpl.cpp b/core/src/db/engine/ExecutionEngineImpl.cpp index 8fc282dfb9..a6b25fc68f 100644 --- a/core/src/db/engine/ExecutionEngineImpl.cpp +++ b/core/src/db/engine/ExecutionEngineImpl.cpp @@ -250,7 +250,7 @@ Status ExecutionEngineImpl::VecSearch(milvus::engine::ExecutionEngineContext& context, const query::VectorQueryPtr& vector_param, knowhere::VecIndexPtr& vec_index, bool hybrid) { - TimeRecorder rc(LogOut("[%s][%ld] ExecutionEngineImpl::Search", "search", 0)); + TimeRecorder rc(LogOut("[%s][%ld] ExecutionEngineImpl::VecSearch", "search", 0)); if (vec_index == nullptr) { LOG_ENGINE_ERROR_ << LogOut("[%s][%ld] ExecutionEngineImpl: index is null, failed to search", "search", 0); @@ -293,12 +293,14 @@ ExecutionEngineImpl::VecSearch(milvus::engine::ExecutionEngineContext& context, if (hybrid) { // HybridUnset(); } + rc.ElapseFromBegin("done"); return Status::OK(); } Status ExecutionEngineImpl::Search(ExecutionEngineContext& context) { + TimeRecorder rc(LogOut("[%s][%ld] ExecutionEngineImpl::Search", "search", 0)); try { ConCurrentBitsetPtr bitset; std::string vector_placeholder; @@ -332,6 +334,7 @@ ExecutionEngineImpl::Search(ExecutionEngineContext& context) { if (!status.ok()) { return status; } + rc.RecordSection("Scalar field filtering"); // Do And for (int64_t i = 0; i < entity_count_; i++) { @@ -355,7 +358,7 @@ ExecutionEngineImpl::Search(ExecutionEngineContext& context) { } catch (std::exception& exception) { return Status{DB_ERROR, "Illegal search params"}; } - + rc.ElapseFromBegin("done"); return Status::OK(); } diff --git a/core/unittest/server/test_web.cpp b/core/unittest/server/test_web.cpp index d1c2bfa384..3ff39936f0 100644 --- a/core/unittest/server/test_web.cpp +++ b/core/unittest/server/test_web.cpp @@ -714,7 +714,7 @@ TEST_F(WebControllerTest, GET_PAGE_ENTITY) { CreateCollection(client_ptr, connection_ptr, collection_name, mapping_json); const int64_t dim = DIM; - const int64_t nb = 3; + const int64_t nb = 100; nlohmann::json insert_json; GenEntities(nb, dim, insert_json); @@ -726,15 +726,6 @@ TEST_F(WebControllerTest, GET_PAGE_ENTITY) { auto status = FlushCollection(client_ptr, connection_ptr, OString(collection_name.c_str())); ASSERT_TRUE(status.ok()); - GenEntities(22, dim, insert_json); - response = client_ptr->insert(collection_name.c_str(), insert_json.dump().c_str(), connection_ptr); - ASSERT_EQ(OStatus::CODE_201.code, response->getStatusCode()); - result_dto = response->readBodyToDto(object_mapper.get()); - ASSERT_EQ(22, result_dto->ids->size()); - - status = FlushCollection(client_ptr, connection_ptr, OString(collection_name.c_str())); - ASSERT_TRUE(status.ok()); - std::string offset = "0"; std::string page_size = "10"; response = client_ptr->getEntity(collection_name.c_str(), offset.c_str(), page_size.c_str(), "", connection_ptr); diff --git a/sdk/examples/binary_vector/src/ClientTest.cpp b/sdk/examples/binary_vector/src/ClientTest.cpp index e2643ef546..b218a3ea62 100644 --- a/sdk/examples/binary_vector/src/ClientTest.cpp +++ b/sdk/examples/binary_vector/src/ClientTest.cpp @@ -63,7 +63,7 @@ TestProcess(std::shared_ptr connection, const milvus::Mappin { // create collection JSON extra_params; - extra_params["segment_size"] = 1024; + extra_params["segment_row_limit"] = 1024; stat = connection->CreateCollection(mapping, extra_params.dump()); std::cout << "CreateCollection function call status: " << stat.message() << std::endl; milvus_sdk::Utils::PrintCollectionParam(mapping); diff --git a/sdk/examples/simple/src/ClientTest.cpp b/sdk/examples/simple/src/ClientTest.cpp index cc3240b6d2..527a363498 100644 --- a/sdk/examples/simple/src/ClientTest.cpp +++ b/sdk/examples/simple/src/ClientTest.cpp @@ -113,7 +113,7 @@ ClientTest::CreateCollection(const std::string& collection_name) { field_ptr4->extra_params = extra_params_4.dump(); JSON extra_params; - extra_params["segment_row_count"] = 1024; + extra_params["segment_row_limit"] = 10000; extra_params["auto_id"] = false; milvus::Mapping mapping = {collection_name, {field_ptr1, field_ptr2, field_ptr3, field_ptr4}}; @@ -339,6 +339,7 @@ ClientTest::Test() { GetCollectionInfo(collection_name); // GetCollectionStats(collection_name); // + LoadCollection(COLLECTION_NAME); BuildVectors(NQ, COLLECTION_DIMENSION); // GetEntityByID(collection_name, search_id_array_); SearchEntities(collection_name, TOP_K, NPROBE, "L2");