From 235232bd52536dee80cf94286c1874df89d79bcb Mon Sep 17 00:00:00 2001 From: luofucong Date: Tue, 26 Dec 2023 14:59:28 +0800 Subject: [PATCH] fix: resolve PR comments --- src/operator/src/insert.rs | 6 +++--- src/servers/src/http.rs | 8 ++------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/operator/src/insert.rs b/src/operator/src/insert.rs index 6ed2528a242b..a17839ed64ae 100644 --- a/src/operator/src/insert.rs +++ b/src/operator/src/insert.rs @@ -27,7 +27,7 @@ use common_meta::datanode_manager::{AffectedRows, DatanodeManagerRef}; use common_meta::peer::Peer; use common_query::Output; use common_telemetry::tracing_context::TracingContext; -use common_telemetry::{debug, error, info}; +use common_telemetry::{error, info}; use datatypes::schema::Schema; use futures_util::future; use meter_macros::write_meter; @@ -301,7 +301,7 @@ impl Inserter { let request_schema = req.rows.as_ref().unwrap().schema.as_slice(); let create_table_expr = &mut build_create_table_expr(&table_ref, request_schema)?; - debug!( + info!( "Table {}.{}.{} does not exist, try create table", table_ref.catalog, table_ref.schema, table_ref.table, ); @@ -320,7 +320,7 @@ impl Inserter { Ok(()) } Err(err) => { - debug!( + error!( "Failed to create table {}.{}.{}: {}", table_ref.catalog, table_ref.schema, table_ref.table, err ); diff --git a/src/servers/src/http.rs b/src/servers/src/http.rs index c4f9cfad57e2..a390f406d778 100644 --- a/src/servers/src/http.rs +++ b/src/servers/src/http.rs @@ -49,7 +49,6 @@ use common_error::status_code::StatusCode; use common_query::Output; use common_recordbatch::{util, RecordBatch}; use common_telemetry::logging::{debug, error, info}; -use common_telemetry::tracing::Level; use common_time::timestamp::TimeUnit; use common_time::Timestamp; use datatypes::data_type::DataType; @@ -62,7 +61,7 @@ use tokio::sync::oneshot::{self, Sender}; use tokio::sync::Mutex; use tower::timeout::TimeoutLayer; use tower::ServiceBuilder; -use tower_http::trace::{DefaultOnFailure, TraceLayer}; +use tower_http::trace::TraceLayer; use self::authorize::AuthState; use crate::configurator::ConfiguratorRef; @@ -711,10 +710,7 @@ impl HttpServer { .layer( ServiceBuilder::new() .layer(HandleErrorLayer::new(handle_error)) - .layer( - TraceLayer::new_for_http() - .on_failure(DefaultOnFailure::new().level(Level::DEBUG)), - ) + .layer(TraceLayer::new_for_http()) .layer(TimeoutLayer::new(self.options.timeout)) .layer(DefaultBodyLimit::max( self.options