Skip to content

Commit

Permalink
fix: Escape brace of dumped JSON for index err message (#37504)
Browse files Browse the repository at this point in the history
Related to #37503

Signed-off-by: Congqi Xia <[email protected]>
  • Loading branch information
congqixia authored Nov 7, 2024
1 parent 7ec449f commit 5310d34
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions internal/core/src/index/VectorMemIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 5310d34

Please sign in to comment.