mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
set size after load (#1539)
Signed-off-by: xiaojun.lin <xiaojun.lin@zilliz.com>
This commit is contained in:
parent
5bb1d001e2
commit
626c9bc593
@ -38,6 +38,7 @@ Please mark all change in change log and use the issue from GitHub
|
||||
- \#1518 Table count did not match after deleting vectors and compact
|
||||
- \#1530 Set table file with correct engine type in meta
|
||||
- \#1525 Add setter API for config preload_table
|
||||
- \#1535 Degradation searching performance with metric_type: binary_idmap
|
||||
|
||||
## Feature
|
||||
- \#216 Add CLI to get server info
|
||||
|
||||
@ -452,6 +452,10 @@ ExecutionEngineImpl::Load(bool to_cache) {
|
||||
status = std::static_pointer_cast<BFIndex>(index_)->AddWithoutIds(vectors->GetCount(),
|
||||
float_vectors.data(), Config());
|
||||
status = std::static_pointer_cast<BFIndex>(index_)->SetBlacklist(concurrent_bitset_ptr);
|
||||
|
||||
int64_t index_size = vectors->GetCount() * conf->d * sizeof(float);
|
||||
int64_t bitset_size = vectors->GetCount() / 8;
|
||||
index_->set_size(index_size + bitset_size);
|
||||
} else if (index_type_ == EngineType::FAISS_BIN_IDMAP) {
|
||||
ec = std::static_pointer_cast<BinBFIndex>(index_)->Build(conf);
|
||||
if (ec != KNOWHERE_SUCCESS) {
|
||||
@ -460,6 +464,10 @@ ExecutionEngineImpl::Load(bool to_cache) {
|
||||
status = std::static_pointer_cast<BinBFIndex>(index_)->AddWithoutIds(vectors->GetCount(),
|
||||
vectors_data.data(), Config());
|
||||
status = std::static_pointer_cast<BinBFIndex>(index_)->SetBlacklist(concurrent_bitset_ptr);
|
||||
|
||||
int64_t index_size = vectors->GetCount() * conf->d * sizeof(uint8_t);
|
||||
int64_t bitset_size = vectors->GetCount() / 8;
|
||||
index_->set_size(index_size + bitset_size);
|
||||
}
|
||||
if (!status.ok()) {
|
||||
return status;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user