mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
GET_PAGE_ENTITY sometimes failed in test_web (#3735)
* [skip ci]Unfit property name segment_row_count in 0.11 Signed-off-by: fishpenguin <kun.yu@zilliz.com> * GET_PAGE_ENTITY sometimes failed in test_web Signed-off-by: fishpenguin <kun.yu@zilliz.com>
This commit is contained in:
parent
590a480550
commit
b6010dfd1f
@ -47,6 +47,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
|
||||
|
||||
@ -253,7 +253,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);
|
||||
@ -296,12 +296,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 {
|
||||
faiss::ConcurrentBitsetPtr bitset;
|
||||
std::string vector_placeholder;
|
||||
@ -335,6 +337,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++) {
|
||||
@ -358,7 +361,7 @@ ExecutionEngineImpl::Search(ExecutionEngineContext& context) {
|
||||
} catch (std::exception& exception) {
|
||||
return Status{DB_ERROR, "Illegal search params"};
|
||||
}
|
||||
|
||||
rc.ElapseFromBegin("done");
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
||||
@ -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<milvus::server::web::EntityIdsDtoT>(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);
|
||||
|
||||
@ -63,7 +63,7 @@ TestProcess(std::shared_ptr<milvus::Connection> 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);
|
||||
|
||||
@ -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;
|
||||
milvus::Mapping mapping = {collection_name, {field_ptr1, field_ptr2, field_ptr3, field_ptr4}};
|
||||
|
||||
milvus::Status stat = conn_->CreateCollection(mapping, extra_params.dump());
|
||||
@ -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");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user