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
Xianhui Lin 2025-04-24 21:06:37 +08:00 committed by GitHub
parent 52f255c958
commit 1a6838b496
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -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());