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
3 changes: 1 addition & 2 deletions server/src/storage/object_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions server/src/storage/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(|_| ())?)
}
Expand Down