mirror of https://github.com/milvus-io/milvus.git
fix: json stats add map null check before insert into tantivity (#41505)
json stats add map null check before insert into tantivity. Json stats index may fail if there is no data issue:https://github.com/milvus-io/milvus/issues/41494 --------- Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>pull/41512/head
parent
52f255c958
commit
1a6838b496
|
|
@ -58,6 +58,9 @@ JsonKeyStatsInvertedIndex::AddInvertedRecord(
|
|||
std::vector<uintptr_t> json_offsets_lens;
|
||||
std::vector<const char*> keys;
|
||||
std::vector<const int64_t*> json_offsets;
|
||||
if (mp.empty()) {
|
||||
return;
|
||||
}
|
||||
for (auto& iter : mp) {
|
||||
keys.push_back(iter.first.c_str());
|
||||
json_offsets.push_back(iter.second.data());
|
||||
|
|
|
|||
Loading…
Reference in New Issue