chore: remove addr from datanode error message (#1152)

* chore: remove addr from datanode error message

* chore: add log for flight get error
This commit is contained in:
localhost
2023-03-10 14:13:01 +08:00
committed by GitHub
parent 6a574fc52b
commit ded31fb069
4 changed files with 13 additions and 6 deletions

1
Cargo.lock generated
View File

@@ -1349,6 +1349,7 @@ dependencies = [
"common-grpc-expr",
"common-query",
"common-recordbatch",
"common-telemetry",
"common-time",
"datafusion",
"datanode",

View File

@@ -16,6 +16,7 @@ common-grpc-expr = { path = "../common/grpc-expr" }
common-query = { path = "../common/query" }
common-recordbatch = { path = "../common/recordbatch" }
common-time = { path = "../common/time" }
common-telemetry = { path = "../common/telemetry" }
datafusion.workspace = true
datatypes = { path = "../datatypes" }
enum_dispatch = "0.3"

View File

@@ -26,6 +26,7 @@ use arrow_flight::{FlightData, Ticket};
use common_error::prelude::*;
use common_grpc::flight::{flight_messages_to_recordbatches, FlightDecoder, FlightMessage};
use common_query::Output;
use common_telemetry::logging;
use futures_util::{TryFutureExt, TryStreamExt};
use prost::Message;
use snafu::{ensure, ResultExt};
@@ -149,6 +150,15 @@ impl Database {
tonic_code: e.code(),
addr: client.addr(),
})
.map_err(|error| {
logging::error!(
"Failed to do Flight get, addr: {}, code: {}, source: {}",
client.addr(),
e.code(),
error
);
error
})
.unwrap_err()
})?;

View File

@@ -26,12 +26,7 @@ pub enum Error {
backtrace: Backtrace,
},
#[snafu(display(
"Failed to do Flight get, addr: {}, code: {}, source: {}",
addr,
tonic_code,
source
))]
#[snafu(display("Failed to do Flight get, code: {}, source: {}", tonic_code, source))]
FlightGet {
addr: String,
tonic_code: Code,