Skip to content

Commit

Permalink
Remove WeakIndexingSplitStore (#4345)
Browse files Browse the repository at this point in the history
  • Loading branch information
guilload authored Jan 3, 2024
1 parent 53754d5 commit a0462e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#[cfg(any(test, feature = "testsuite"))]
use std::collections::HashMap;
use std::path::{Path, PathBuf};
use std::sync::{Arc, Weak};
use std::sync::Arc;
use std::time::Instant;

use anyhow::Context;
Expand Down Expand Up @@ -68,18 +68,6 @@ struct InnerIndexingSplitStore {
local_split_store: Arc<LocalSplitStore>,
}

pub struct WeakIndexingSplitStore {
inner: Weak<InnerIndexingSplitStore>,
}

impl WeakIndexingSplitStore {
pub fn upgrade(&self) -> Option<IndexingSplitStore> {
self.inner
.upgrade()
.map(|inner| IndexingSplitStore { inner })
}
}

impl IndexingSplitStore {
/// Creates an instance of [`IndexingSplitStore`]
///
Expand Down Expand Up @@ -226,12 +214,6 @@ impl IndexingSplitStore {
get_tantivy_directory_from_split_bundle(&dest_filepath)
}

pub fn downgrade(&self) -> WeakIndexingSplitStore {
WeakIndexingSplitStore {
inner: Arc::downgrade(&self.inner),
}
}

/// Takes a snapshot of the cache view (only used for testing).
#[cfg(any(test, feature = "testsuite"))]
pub async fn inspect_local_store(&self) -> HashMap<String, ByteSize> {
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-indexing/src/split_store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ mod indexing_split_store;
mod local_split_store;
mod split_store_quota;

pub use indexing_split_store::{IndexingSplitStore, WeakIndexingSplitStore};
pub use indexing_split_store::IndexingSplitStore;
pub use local_split_store::{get_tantivy_directory_from_split_bundle, LocalSplitStore};
pub use split_store_quota::SplitStoreQuota;

0 comments on commit a0462e7

Please sign in to comment.