mirror of https://github.com/milvus-io/milvus.git
fix: Escape brace of dumped JSON for index err message (#37504)
Related to #37503 Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/37506/head
parent
7ec449fee5
commit
5310d3469f
|
@ -408,11 +408,13 @@ VectorMemIndex<T>::Query(const DatasetPtr dataset,
|
|||
auto res = index_.Search(dataset, search_conf, bitset);
|
||||
milvus::tracer::AddEvent("finish_knowhere_index_search");
|
||||
if (!res.has_value()) {
|
||||
PanicInfo(ErrorCode::UnexpectedError,
|
||||
"failed to search: config={} {}: {}",
|
||||
search_conf.dump(),
|
||||
KnowhereStatusString(res.error()),
|
||||
res.what());
|
||||
PanicInfo(
|
||||
ErrorCode::UnexpectedError,
|
||||
// escape json brace in case of using message as format
|
||||
"failed to search: config={{{}}} {}: {}",
|
||||
search_conf.dump(),
|
||||
KnowhereStatusString(res.error()),
|
||||
res.what());
|
||||
}
|
||||
return res.value();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue