mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-04 04:12:55 +00:00
fix: continue if parsing err catalog (#1090)
* fix: continue if parsing err catalog * fix: change from warn to error
This commit is contained in:
@@ -27,6 +27,7 @@ use catalog::{
|
||||
RegisterSchemaRequest, RegisterSystemTableRequest, RegisterTableRequest, RenameTableRequest,
|
||||
SchemaProvider, SchemaProviderRef,
|
||||
};
|
||||
use common_telemetry::error;
|
||||
use futures::StreamExt;
|
||||
use meta_client::rpc::TableName;
|
||||
use partition::manager::PartitionRuleManagerRef;
|
||||
@@ -156,9 +157,13 @@ impl CatalogList for FrontendCatalogManager {
|
||||
|
||||
while let Some(r) = iter.next().await {
|
||||
let Kv(k, _) = r?;
|
||||
let key = CatalogKey::parse(String::from_utf8_lossy(&k))
|
||||
.context(InvalidCatalogValueSnafu)?;
|
||||
res.insert(key.catalog_name);
|
||||
|
||||
let catalog_key = String::from_utf8_lossy(&k);
|
||||
if let Ok(key) = CatalogKey::parse(catalog_key.as_ref()) {
|
||||
res.insert(key.catalog_name);
|
||||
} else {
|
||||
error!("invalid catalog key: {:?}", catalog_key);
|
||||
}
|
||||
}
|
||||
Ok(res.into_iter().collect())
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user