Skip to content

Commit

Permalink
address CR.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachelint committed Dec 27, 2022
1 parent 6fb0fb9 commit 217429c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
26 changes: 17 additions & 9 deletions remote_engine_client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,33 +74,41 @@ pub mod error {
source: Box<dyn std::error::Error + Send + Sync>,
},

#[snafu(display("Failed to connect, table:{:?}, msg:{}, err:{}", table, msg, source))]
#[snafu(display(
"Failed to connect, table_ident:{:?}, msg:{}, err:{}",
table_ident,
msg,
source
))]
Rpc {
table: TableIdentifier,
table_ident: TableIdentifier,
msg: String,
source: tonic::Status,
},

#[snafu(display(
"Failed query from table in server, table:{:?}, code:{}, msg:{}",
table,
"Failed to query from table in server, table_ident:{:?}, code:{}, msg:{}",
table_ident,
code,
msg
))]
Server {
table: TableIdentifier,
table_ident: TableIdentifier,
code: u32,
msg: String,
},

#[snafu(display("Failed to route table, table:{:?}, err:{}", table, source,))]
#[snafu(display("Failed to route table, table_ident:{:?}, err:{}", table_ident, source,))]
RouteWithCause {
table: TableIdentifier,
table_ident: TableIdentifier,
source: router::Error,
},

#[snafu(display("Failed to route table, table:{:?}, msg:{}", table, msg,))]
RouteNoCause { table: TableIdentifier, msg: String },
#[snafu(display("Failed to route table, table_ident:{:?}, msg:{}", table_ident, msg,))]
RouteNoCause {
table_ident: TableIdentifier,
msg: String,
},
}

define_result!(Error);
Expand Down
2 changes: 1 addition & 1 deletion table_engine/src/remote/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use snafu::{Backtrace, OptionExt, ResultExt, Snafu};

use crate::table::{ReadRequest as TableReadRequest, WriteRequest as TableWriteRequest};

const ENCODE_ROWS_WITH_AVRO: u32 = 0;
const ENCODE_ROWS_WITH_AVRO: u32 = 1;

#[derive(Debug, Snafu)]
pub enum Error {
Expand Down

0 comments on commit 217429c

Please sign in to comment.