[Enhance][Log] Make RPC error log more clear (#4702)

At present, when some rpc errors occur, the client cannot obtain the error information well.

And this CL change the RPC error returned to client like this:

```
ERROR 1064 (HY000): errCode = 2, detailMessage = there is no scanNode Backend. [10002: in black list(A error 
occurred: errorCode=2001 errorMessage:Channel inactive error!)]

ERROR 1064 (HY000): failed to send brpc batch, error=The server is overcrowded, error_text=[E1011]The server is 
overcrowded @xx.xx.xx.xx:8060 [R1][E1011]The server is overcrowded @xx.xx.xx.xx:8060 [R2][E1011]The server is 
overcrowded @xx.xx.xx.xx:8060 [R3][E1011]The server is overcrowded @xx.xx.xx.xx:8060, client: yy.yy.yy.yy
```
This commit is contained in:
Mingyu Chen
2020-10-13 10:08:43 +08:00
committed by GitHub
parent 83f6f46c34
commit f431d8d94c
12 changed files with 329 additions and 299 deletions

View File

@ -308,22 +308,10 @@ Status DataSpliter::close(RuntimeState* state, Status close_status) {
}
Expr::close(_partition_expr_ctxs, state);
for (auto& iter : _rollup_map) {
Status status = iter.second->close(state);
if (UNLIKELY(is_ok && !status.ok())) {
LOG(WARNING) << "close rollup_map error"
<< " err_msg=" << status.get_error_msg();
is_ok = false;
err_status = status;
}
iter.second->close(state);
}
for (auto iter : _partition_infos) {
Status status = iter->close(state);
if (UNLIKELY(is_ok && !status.ok())) {
LOG(WARNING) << "close partition_info error"
<< " err_msg=" << status.get_error_msg();
is_ok = false;
err_status = status;
}
iter->close(state);
}
_expr_mem_tracker.reset();