Fix HNSW and RNSG index files size (#2618)

Signed-off-by: shengjun.li <shengjun.li@zilliz.com>
pull/2638/head
shengjun.li 2020-06-20 14:06:05 +08:00 committed by GitHub
parent 583458836f
commit 48e8cd36c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -10,6 +10,7 @@ Please mark all change in change log and use the issue from GitHub
- \#2578 Result count doesn't match target vectors count - \#2578 Result count doesn't match target vectors count
- \#2557 fix random crash of INSERT_DUPLICATE_ID case - \#2557 fix random crash of INSERT_DUPLICATE_ID case
- \#2598 fix Milvus docker image report illegal instruction - \#2598 fix Milvus docker image report illegal instruction
- \#2617 Fix HNSW and RNSG index files size
## Feature ## Feature

View File

@ -49,7 +49,7 @@ IndexHNSW::Serialize(const Config& config) {
std::shared_ptr<uint8_t[]> data(writer.data_); std::shared_ptr<uint8_t[]> data(writer.data_);
BinarySet res_set; BinarySet res_set;
res_set.Append("HNSW", data, writer.total); res_set.Append("HNSW", data, writer.rp);
return res_set; return res_set;
} catch (std::exception& e) { } catch (std::exception& e) {
KNOWHERE_THROW_MSG(e.what()); KNOWHERE_THROW_MSG(e.what());

View File

@ -47,7 +47,7 @@ NSG::Serialize(const Config& config) {
std::shared_ptr<uint8_t[]> data(writer.data_); std::shared_ptr<uint8_t[]> data(writer.data_);
BinarySet res_set; BinarySet res_set;
res_set.Append("NSG", data, writer.total); res_set.Append("NSG", data, writer.rp);
return res_set; return res_set;
} catch (std::exception& e) { } catch (std::exception& e) {
KNOWHERE_THROW_MSG(e.what()); KNOWHERE_THROW_MSG(e.what());