Repository: impala Updated Branches: refs/heads/master d2fe9f437 -> 0936e3296
IMPALA-6308: Fix bad Status() usage in data-stream-sender.cc Previously, DataStreamSender::FlushAndSendEos() makes some wrong assumption about the format string of the error status returned from DoTransmitDataRpc(). In particular, it assumes that the format string has exactly one substitution argument. This is a pretty bad assumption as new types of errors could be returned from DoTransmitDataRpc() and they can take different numbers of substitution arguments. Recent changes in the format string TErrorCode::RPC_RECV_TIMEOUT exposed this bug. This change fixes the problem by removing this bad usage of Status() in data-stream-sender.cc Change-Id: I1cc04db670069a7df484e2f2bafb93c5315b9c82 Reviewed-on: http://gerrit.cloudera.org:8080/8817 Reviewed-by: Tim Armstrong <[email protected]> Tested-by: Impala Public Jenkins Project: http://git-wip-us.apache.org/repos/asf/impala/repo Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/e57c77f0 Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/e57c77f0 Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/e57c77f0 Branch: refs/heads/master Commit: e57c77f095cbf1660b02d629f7b0cb6a92491e0e Parents: d2fe9f4 Author: Michael Ho <[email protected]> Authored: Mon Dec 11 22:49:14 2017 -0800 Committer: Impala Public Jenkins <[email protected]> Committed: Tue Dec 12 21:05:54 2017 +0000 ---------------------------------------------------------------------- be/src/runtime/data-stream-sender.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/impala/blob/e57c77f0/be/src/runtime/data-stream-sender.cc ---------------------------------------------------------------------- diff --git a/be/src/runtime/data-stream-sender.cc b/be/src/runtime/data-stream-sender.cc index 2d1c6b7..c572467 100644 --- a/be/src/runtime/data-stream-sender.cc +++ b/be/src/runtime/data-stream-sender.cc @@ -312,9 +312,9 @@ Status DataStreamSender::Channel::FlushAndSendEos(RuntimeState* state) { VLOG_RPC << "calling TransmitData(eos=true) to terminate channel."; rpc_status_ = DoTransmitDataRpc(&client, params, &res); if (!rpc_status_.ok()) { - return Status(rpc_status_.code(), - Substitute("TransmitData(eos=true) to $0 failed:\n $1", - TNetworkAddressToString(address_), rpc_status_.msg().msg())); + LOG(ERROR) << "Failed to send EOS to " << TNetworkAddressToString(address_) + << " : " << rpc_status_.GetDetail(); + return rpc_status_; } return Status(res.status); }
