Michael Ho has uploaded this change for review. ( http://gerrit.cloudera.org:8080/13607
Change subject: IMPALA-7802: Close connections of idle client sessions ...................................................................... IMPALA-7802: Close connections of idle client sessions Previously, if idle session timeout is set either via startup flag or query options, a client session will expire after that set period of inactivity. However, the network connection and the service thread of an expired session will still be around until the session is closed by the client. This is highly undesirable as these idle sessions still count towards the quota bound by --fe_esrvice_threads, so if the total number of sessions (including the idle ones) reaches that upper bound, all incoming new session will block until some of the existing sessions exit. There is no time bound on when those expired sessions will be closed. In some sense, leaving many idle sessions opened is a denial-of-service attack on Impala. This change implements support for closing expired client sessions. In particular, a new flag --idle_client_poll_time_ms is added to specify a time interval in milliseconds of client's inactivity which will cause an idle service thread of a client connection to wake up and check if all sessions associated with the connection are idle. If so, the connection will be closed. This allows the service threads to be freed up without waiting for client to close the connections. Testing done: - core build - new targeted test which verifies the connections of expired sessions are closed. Change-Id: I97c4fb8e1b741add273f8a913fb0967303683e38 --- M be/src/rpc/TAcceptQueueServer.cpp M be/src/rpc/TAcceptQueueServer.h M be/src/rpc/thrift-server.cc M be/src/rpc/thrift-server.h M be/src/rpc/thrift-util.cc M be/src/rpc/thrift-util.h M be/src/service/impala-server.cc M be/src/service/impala-server.h M tests/custom_cluster/test_hs2.py M tests/custom_cluster/test_session_expiration.py 10 files changed, 291 insertions(+), 85 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/07/13607/1 -- To view, visit http://gerrit.cloudera.org:8080/13607 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I97c4fb8e1b741add273f8a913fb0967303683e38 Gerrit-Change-Number: 13607 Gerrit-PatchSet: 1 Gerrit-Owner: Michael Ho <[email protected]>
