Skip to content

Commit 7e708bb

Browse files
authored
fix: readiness api to use correct JSON path (#758)
1 parent c1c0861 commit 7e708bb

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

server/src/storage/object_storage.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ pub trait ObjectStorage: Sync + 'static {
101101
async fn get_latency(&self) -> Duration {
102102
// It's Ok to `unwrap` here. The hardcoded value will always Result in
103103
// an `Ok`.
104-
let path = RelativePathBuf::from_path(PARSEABLE_METADATA_FILE_NAME).unwrap();
105-
104+
let path = parseable_json_path();
106105
let start = Instant::now();
107106
let _ = self.get_object(&path).await;
108107
start.elapsed()

server/src/storage/s3.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ use crate::metrics::storage::{s3::REQUEST_RESPONSE_TIME, StorageMetrics};
4242
use crate::storage::{LogStream, ObjectStorage, ObjectStorageError, PARSEABLE_ROOT_DIRECTORY};
4343

4444
use super::metrics_layer::MetricLayer;
45+
use super::object_storage::parseable_json_path;
4546
use super::{
46-
ObjectStorageProvider, PARSEABLE_METADATA_FILE_NAME, SCHEMA_FILE_NAME,
47-
STREAM_METADATA_FILE_NAME, STREAM_ROOT_DIRECTORY,
47+
ObjectStorageProvider, SCHEMA_FILE_NAME, STREAM_METADATA_FILE_NAME, STREAM_ROOT_DIRECTORY,
4848
};
4949

5050
// in bytes
@@ -533,7 +533,7 @@ impl ObjectStorage for S3 {
533533
async fn check(&self) -> Result<(), ObjectStorageError> {
534534
Ok(self
535535
.client
536-
.head(&PARSEABLE_METADATA_FILE_NAME.into())
536+
.head(&to_object_store_path(&parseable_json_path()))
537537
.await
538538
.map(|_| ())?)
539539
}

0 commit comments

Comments
 (0)