Thomas Marshall has uploaded this change for review. ( 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. Fortunately, the amount of space used to track a session is fairly small: a single entry in a map to a SessionState struct, which should generally be small. This also means that any queries associated with the session will not be cancelled when the connection is lost. We already provide the option 'idle_session_timeout', which can be used to expire the session and cancel all of its queries. Note, though, that the timeout is off by default and that a session that is expired due to a timeout is not removed from the session map. We may want to consider changing some of this behavior. Testing: - Added an e2e test that starts a hiveserver2 session, closes the connection, opens another, and checks the session is still valid. Change-Id: Ia4555cd9b73db5b4dde92cd4fac4f9bfa3664d78 --- M be/src/service/impala-hs2-server.cc M be/src/service/impala-server.cc M be/src/service/impala-server.h M tests/hs2/test_hs2.py 4 files changed, 46 insertions(+), 32 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/06/13306/1 -- 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: newchange Gerrit-Change-Id: Ia4555cd9b73db5b4dde92cd4fac4f9bfa3664d78 Gerrit-Change-Number: 13306 Gerrit-PatchSet: 1 Gerrit-Owner: Thomas Marshall <[email protected]>
