Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/13306 )
Change subject: IMPALA-1653: Don't close hiveserver2 session when connection is closed ...................................................................... IMPALA-1653: Don't close hiveserver2 session when connection is closed Currently, when a client connection is closed, we always close any session started over that connection. This is a requirement for beeswax, which always ties sessions to connections, but it is not required for hiveserver2, which allows sessions to be used across connections with a session token. This patch changes this behavior so that hiveserver2 sessions are no longer closed when the corresponding connection is closed. One downside of this change is that clients may inadvertently leave sessions open indefinitely if they close their connection without calling CloseSession(), which can waste space on the coordinator. We already have a flag --idle_session_timeout, but this flag is off by default and sessions that hit this timeout are expired but not fully closed. Rather than changing the default idle session behavior, which could affect existing users, this patch mitigates this issue by adding a new flag: --disconnected_session_timeout which is set to 1 hour by default. When a session has had no open connections for longer than this time, it will be closed and any associated queries will be unregistered. Testing: - Added e2e tests. Change-Id: Ia4555cd9b73db5b4dde92cd4fac4f9bfa3664d78 Reviewed-on: http://gerrit.cloudera.org:8080/13306 Reviewed-by: Tim Armstrong <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M be/src/rpc/thrift-server.cc M be/src/rpc/thrift-server.h M be/src/service/impala-beeswax-server.cc M be/src/service/impala-hs2-server.cc M be/src/service/impala-server.cc M be/src/service/impala-server.h M common/thrift/generate_error_codes.py M tests/common/impala_connection.py A tests/custom_cluster/test_hs2.py M tests/hs2/test_hs2.py 10 files changed, 330 insertions(+), 89 deletions(-) Approvals: Tim Armstrong: Looks good to me, approved Impala Public Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/13306 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia4555cd9b73db5b4dde92cd4fac4f9bfa3664d78 Gerrit-Change-Number: 13306 Gerrit-PatchSet: 12 Gerrit-Owner: Thomas Marshall <[email protected]> Gerrit-Reviewer: Andrew Sherman <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Michael Ho <[email protected]> Gerrit-Reviewer: Thomas Marshall <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]>
