impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sailesh Mukil (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-2864: Ensure that client connections are closed after a failed Open()
Date Tue, 06 Dec 2016 21:03:40 GMT
Sailesh Mukil has uploaded a new patch set (#2).

Change subject: IMPALA-2864: Ensure that client connections are closed after a failed Open()
......................................................................

IMPALA-2864: Ensure that client connections are closed after a failed Open()

When a client tries to Open() a socket and fails, we
previously assumed that the socket was never opened and therefore did
not close it. However, if Kerberos is enabled, the
ThriftClientImpl::Open() calls TSaslTransport::Open(), which not only
opens the socket but also does the initial handshake. If there was an
error during the handshake, we just returned with an error without
closing the socket, causing the server side to wait on the same
connection.

This patch closes the client side socket, thereby terminating the
connection to the server in the above scenario, so that the server
side doesn't need to hold on to a connection until a timeout
terminates the connection.

A thrift-server-test is added to test the RPC failure path.

Change-Id: Ia7e883d8224304ad13a051f595d0e8abf4f9671e
---
M be/src/rpc/thrift-client.cc
M be/src/rpc/thrift-client.h
M be/src/rpc/thrift-server-test.cc
M be/src/runtime/client-cache.h
M be/src/runtime/data-stream-test.cc
A be/src/testutil/bad-cert.pem
A be/src/testutil/bad-key.pem
7 files changed, 85 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/85/5385/2
-- 
To view, visit http://gerrit.cloudera.org:8080/5385
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia7e883d8224304ad13a051f595d0e8abf4f9671e
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Sailesh Mukil <sailesh@cloudera.com>

Mime
View raw message