From 50d2685365093aa47efb5137129ce10aeca7887e Mon Sep 17 00:00:00 2001 From: shuiyisong <113876041+shuiyisong@users.noreply.github.com> Date: Mon, 27 Feb 2023 22:51:49 +0800 Subject: [PATCH] fix: fix catalog parsing issue (#1091) fix: try fix catalog parsing issue --- src/catalog/src/remote/manager.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/catalog/src/remote/manager.rs b/src/catalog/src/remote/manager.rs index 200341ec473..47b06526279 100644 --- a/src/catalog/src/remote/manager.rs +++ b/src/catalog/src/remote/manager.rs @@ -21,7 +21,7 @@ use arc_swap::ArcSwap; use async_stream::stream; use async_trait::async_trait; use common_catalog::consts::{DEFAULT_CATALOG_NAME, DEFAULT_SCHEMA_NAME, MIN_USER_TABLE_ID}; -use common_telemetry::{debug, info}; +use common_telemetry::{debug, error, info}; use futures::Stream; use futures_util::StreamExt; use snafu::{OptionExt, ResultExt}; @@ -109,9 +109,14 @@ impl RemoteCatalogManager { debug!("Ignoring non-catalog key: {}", String::from_utf8_lossy(&k)); continue; } - let key = CatalogKey::parse(&String::from_utf8_lossy(&k)) - .context(InvalidCatalogValueSnafu)?; - yield Ok(key) + + let catalog_key = String::from_utf8_lossy(&k); + if let Ok(key) = CatalogKey::parse(&catalog_key) { + yield Ok(key) + } else { + error!("Invalid catalog key: {:?}", catalog_key); + continue; + } } })) }