diff --git a/server/src/storage/object_storage.rs b/server/src/storage/object_storage.rs index a49a851d3..c3acec8fa 100644 --- a/server/src/storage/object_storage.rs +++ b/server/src/storage/object_storage.rs @@ -101,8 +101,7 @@ pub trait ObjectStorage: Sync + 'static { async fn get_latency(&self) -> Duration { // It's Ok to `unwrap` here. The hardcoded value will always Result in // an `Ok`. - let path = RelativePathBuf::from_path(PARSEABLE_METADATA_FILE_NAME).unwrap(); - + let path = parseable_json_path(); let start = Instant::now(); let _ = self.get_object(&path).await; start.elapsed() diff --git a/server/src/storage/s3.rs b/server/src/storage/s3.rs index ae48a1d51..ddeeea786 100644 --- a/server/src/storage/s3.rs +++ b/server/src/storage/s3.rs @@ -42,9 +42,9 @@ use crate::metrics::storage::{s3::REQUEST_RESPONSE_TIME, StorageMetrics}; use crate::storage::{LogStream, ObjectStorage, ObjectStorageError, PARSEABLE_ROOT_DIRECTORY}; use super::metrics_layer::MetricLayer; +use super::object_storage::parseable_json_path; use super::{ - ObjectStorageProvider, PARSEABLE_METADATA_FILE_NAME, SCHEMA_FILE_NAME, - STREAM_METADATA_FILE_NAME, STREAM_ROOT_DIRECTORY, + ObjectStorageProvider, SCHEMA_FILE_NAME, STREAM_METADATA_FILE_NAME, STREAM_ROOT_DIRECTORY, }; // in bytes @@ -533,7 +533,7 @@ impl ObjectStorage for S3 { async fn check(&self) -> Result<(), ObjectStorageError> { Ok(self .client - .head(&PARSEABLE_METADATA_FILE_NAME.into()) + .head(&to_object_store_path(&parseable_json_path())) .await .map(|_| ())?) }