未验证 提交 f25def79 编写于 作者: C Cai Yudong 提交者: GitHub

Add debug logs for search results handling (#11186)

Signed-off-by: Nyudong.cai <yudong.cai@zilliz.com>
上级 1e17ddfb
......@@ -152,6 +152,8 @@ ReduceSearchResultsAndFillData(CSearchPlan c_plan, CSearchResult* c_search_resul
std::vector<SearchResult*> search_results;
for (int i = 0; i < num_segments; ++i) {
search_results.push_back((SearchResult*)c_search_results[i]);
LOG_SEGCORE_DEBUG_ << "No." << i << ": search result addr " << c_search_results[i] << ", segment addr "
<< search_results[i]->segment_;
}
auto topk = search_results[0]->topk_;
auto num_queries = search_results[0]->num_queries_;
......@@ -162,15 +164,18 @@ ReduceSearchResultsAndFillData(CSearchPlan c_plan, CSearchResult* c_search_resul
auto segment = (milvus::segcore::SegmentInterface*)(search_result->segment_);
segment->FillPrimaryKeys(plan, *search_result);
}
LOG_SEGCORE_DEBUG_ << "Fill primary key done";
GetResultData(search_records, search_results, num_queries, topk);
ResetSearchResult(search_records, search_results);
LOG_SEGCORE_DEBUG_ << "Search result reduce done";
// fill in other entities
for (auto& search_result : search_results) {
auto segment = (milvus::segcore::SegmentInterface*)(search_result->segment_);
segment->FillTargetEntry(plan, *search_result);
}
LOG_SEGCORE_DEBUG_ << "Fill target entry done";
auto status = CStatus();
status.error_code = Success;
......
......@@ -12,6 +12,7 @@
#include <cstring>
#include <cstdint>
#include "log/Log.h"
#include "segcore/SegmentGrowing.h"
#include "segcore/SegmentSealed.h"
#include "segcore/Collection.h"
......@@ -52,14 +53,14 @@ NewSegment(CCollection collection, uint64_t segment_id, SegmentType seg_type) {
void
DeleteSegment(CSegmentInterface c_segment) {
// TODO: use dynamic cast, and return c status
LOG_SEGCORE_DEBUG_ << "delete segment " << c_segment;
auto s = (milvus::segcore::SegmentInterface*)c_segment;
// std::cout << "delete segment " << std::endl;
delete s;
}
void
DeleteSearchResult(CSearchResult search_result) {
LOG_SEGCORE_DEBUG_ << "delete search result " << search_result;
auto res = (milvus::SearchResult*)search_result;
delete res;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册