Skip to content

Commit

Permalink
fix ivf : after dump, shouldn't call decrease memory usage when destr…
Browse files Browse the repository at this point in the history
…ucting
  • Loading branch information
vsian committed Dec 10, 2024
1 parent 817fa01 commit e097d20
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/storage/knn_index/knn_ivf/ivf_index_data_in_mem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ class IVFIndexInMemT final : public IVFIndexInMem {
}
}

~IVFIndexInMemT() { BaseMemIndex::DecreaseMemoryUsage(MemoryUsed()); }
~IVFIndexInMemT() {
if (own_ivf_index_storage_) {
BaseMemIndex::DecreaseMemoryUsage(MemoryUsed());
}
}

MemIndexTracerInfo GetInfo() const override {
auto *table_index_entry = segment_index_entry_->table_index_entry();
Expand Down

0 comments on commit e097d20

Please sign in to comment.