Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust/index/src/hnsw_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub struct HnswIndexProvider {
// TODO(tanujnay112): This feature flag is a temporary measure to gate
// the hnsw loading from memory feature. Remove this after that feature
// stabilizes.
use_direct_hnsw: bool,
pub use_direct_hnsw: bool,
}

pub struct HnswIndexFlusher {
Expand Down
5 changes: 5 additions & 0 deletions rust/worker/src/execution/orchestration/compact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,11 @@ impl CompactionContext {
}

pub(crate) async fn cleanup(self) {
if self.hnsw_provider.use_direct_hnsw {
return;
}

// TODO(tanujnay112): Remove when use_direct_hnsw is fully deprecated
for hnsw_index_uuid in self.hnsw_index_uuids {
let _ = HnswIndexProvider::purge_one_id(
self.hnsw_provider.temporary_storage_path.as_path(),
Expand Down
Loading