Skip to content

Commit

Permalink
chore: apply suggestions from CR
Browse files Browse the repository at this point in the history
  • Loading branch information
WenyXu committed Jan 5, 2024
1 parent 99c1df4 commit e9b1fa0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mito2/src/cache/file_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use futures::{FutureExt, TryStreamExt};
use moka::future::Cache;
use moka::notification::RemovalCause;
use object_store::util::join_path;
use object_store::{ErrorKind, Metakey, ObjectStore, Reader, Result as ObjectStoreResult};
use object_store::{ErrorKind, Metakey, ObjectStore, Reader};
use snafu::ResultExt;
use store_api::storage::RegionId;

Expand Down Expand Up @@ -100,7 +100,7 @@ impl FileCache {
self.memory_index.insert(key, value).await;
}

pub(crate) async fn get_reader(&self, file_path: &str) -> ObjectStoreResult<Option<Reader>> {
async fn get_reader(&self, file_path: &str) -> object_store::Result<Option<Reader>> {
if self.local_store.is_exist(file_path).await? {
Ok(Some(self.local_store.reader(file_path).await?))
} else {
Expand All @@ -126,7 +126,7 @@ impl FileCache {
warn!("Failed to get file for key {:?}, err: {}", key, e);
}
}
_ => {}
Ok(None) => {}
}

// We removes the file from the index.
Expand Down

0 comments on commit e9b1fa0

Please sign in to comment.