From 588f6755f08b65e29a7f4264ec14109d70fb6884 Mon Sep 17 00:00:00 2001 From: shuiyisong <113876041+shuiyisong@users.noreply.github.com> Date: Fri, 27 Dec 2024 12:34:19 +0800 Subject: [PATCH] fix: disable path label in opendal for now (#5247) * fix: remove path label in opendal for now * fix: typo Co-authored-by: Ruihang Xia --------- Co-authored-by: Ruihang Xia --- src/object-store/src/layers.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/object-store/src/layers.rs b/src/object-store/src/layers.rs index 8383fd237952..8ea7662bfb5e 100644 --- a/src/object-store/src/layers.rs +++ b/src/object-store/src/layers.rs @@ -30,13 +30,18 @@ mod prometheus { /// pattern `/catalog/schema/table_id/...` OR `greptimedb/object_cache//...` /// /// We'll get the data/catalog/schema from path. - pub fn build_prometheus_metrics_layer(with_path_label: bool) -> PrometheusLayer { + pub fn build_prometheus_metrics_layer(_with_path_label: bool) -> PrometheusLayer { PROMETHEUS_LAYER .get_or_init(|| { - let path_level = if with_path_label { 3 } else { 0 }; + // let path_level = if with_path_label { 3 } else { 0 }; + + // opendal doesn't support dynamic path label trim + // we have uuid in index path, which causes the label size to explode + // remove path label first, waiting for later fix + // TODO(shuiyisong): add dynamic path label trim for opendal let layer = PrometheusLayer::builder() - .path_label(path_level) + .path_label(0) .register_default() .unwrap();