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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ temp-dir = "0.1.14"

[package.metadata.parseable_ui]
assets-url = "https://parseable-prism-build.s3.us-east-2.amazonaws.com/v2.5.14/build.zip"
assets-sha1 = "de42d79d38c4a7327d20be542950344800d426a8"
assets-sha1 = "7b3d1a6bea288585183cbc8233af4da91d768853"

[features]
debug = []
Expand Down
7 changes: 5 additions & 2 deletions src/catalog/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,9 @@ pub async fn remove_manifest_from_snapshot(
let stream_name_clone = stream_name.to_string();
let dates_clone = dates.clone();

for_each_live_node(tenant_id, move |ingestor| {
// only ingestors' snapshots contain the manifest paths, so we need to send the retention cleanup request to all ingestors
// querier does not have /retention/cleanup endpoint, but it does not need to receive the request since it does not have the manifest paths in its snapshot
let _ = for_each_live_node(tenant_id, move |ingestor| {
let stream_name = stream_name_clone.clone();
let dates = dates_clone.clone();
async move {
Expand All @@ -552,7 +554,8 @@ pub async fn remove_manifest_from_snapshot(
Ok::<(), ObjectStorageError>(())
}
})
.await?;
.await
.map_err(|e| tracing::error!("{e}"));
}

Ok(())
Expand Down
18 changes: 12 additions & 6 deletions src/storage/metrics_layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,9 @@ impl<T: ObjectStore> ObjectStore for MetricLayer<T> {
let inner = self.inner.list(prefix);
let res = StreamMetricWrapper {
time,
labels: ["LIST", "200"],
provider: self.provider.clone(),
method: "LIST",
status: "200",
inner,
};
Box::pin(res)
Expand All @@ -308,7 +310,9 @@ impl<T: ObjectStore> ObjectStore for MetricLayer<T> {
let inner = self.inner.list_with_offset(prefix, offset);
let res = StreamMetricWrapper {
time,
labels: ["LIST_OFFSET", "200"],
provider: self.provider.clone(),
method: "LIST_OFFSET",
status: "200",
inner,
};

Expand Down Expand Up @@ -396,13 +400,15 @@ impl<T: ObjectStore> ObjectStore for MetricLayer<T> {
}
}

struct StreamMetricWrapper<'a, const N: usize, T> {
struct StreamMetricWrapper<'a, T> {
time: time::Instant,
labels: [&'static str; N],
provider: String,
method: &'static str,
status: &'static str,
inner: BoxStream<'a, T>,
}

impl<T, const N: usize> Stream for StreamMetricWrapper<'_, N, T> {
impl<T> Stream for StreamMetricWrapper<'_, T> {
type Item = T;

fn poll_next(
Expand All @@ -412,7 +418,7 @@ impl<T, const N: usize> Stream for StreamMetricWrapper<'_, N, T> {
match self.inner.poll_next_unpin(cx) {
t @ Poll::Ready(None) => {
STORAGE_REQUEST_RESPONSE_TIME
.with_label_values(&self.labels)
.with_label_values(&[&self.provider, self.method, self.status])
.observe(self.time.elapsed().as_secs_f64());
t
}
Expand Down
Loading