Thomas Marshall has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/13306 )

Change subject: IMPALA-1653: Don't close hiveserver2 session when connection is 
closed
......................................................................


Patch Set 6:

(10 comments)

http://gerrit.cloudera.org:8080/#/c/13306/5/be/src/service/impala-server.cc
File be/src/service/impala-server.cc:

http://gerrit.cloudera.org:8080/#/c/13306/5/be/src/service/impala-server.cc@211
PS5, Line 211: DEFINE_int32(disconnected_session_timeout, 15 * 60, "The time, 
in seconds, that a "
> I think we could set this lower. One data point is that hue sets the query
Done


http://gerrit.cloudera.org:8080/#/c/13306/5/be/src/service/impala-server.cc@1393
PS5, Line 1393:   if (session_type == TSessionType::HIVESERVER2) {
> Probably worth documenting why this is necessary, i.e. we might be using th
Done


http://gerrit.cloudera.org:8080/#/c/13306/5/be/src/service/impala-server.cc@2053
PS5, Line 2053: ::ConnectionEnd(
> Maybe disconnected_sessions?
Done


http://gerrit.cloudera.org:8080/#/c/13306/5/be/src/service/impala-server.cc@2064
PS5, Line 2064:     // We don't expect a large number of sessions per 
connection, so we copy it, so that
> move() to avoid copying set?
Done


http://gerrit.cloudera.org:8080/#/c/13306/5/be/src/service/impala-server.cc@2085
PS5, Line 2085: }
> DCHECK_EQ
Done


http://gerrit.cloudera.org:8080/#/c/13306/5/be/src/service/impala-server.cc@2127
PS5, Line 2127:       } else {
> Not your change, but I feel like this was a bit overengineered. If I unders
Yeah it looks like the original intention was to adaptively  set the sleep 
period to be equal to the smallest registered timeout divided by 2, hence using 
a set to store all the individual timeout values.

That behavior resulted in IMPALA-5108, which was fixed by setting the timeout 
to always be 1 second, but we didn't remove the set then.

I think it still makes sense to have a mechanism for not running this thread 
when no session timeouts are set, since that's the default situation, but we 
could do it more efficiently by just maintaining a count of registered 
timeouts. I can take that on in this patch or file a JIRA for it.


http://gerrit.cloudera.org:8080/#/c/13306/5/be/src/service/impala-server.cc@2150
PS5, Line 2150:           if (session_state->closed) continue;
> Why is this mutually exclusive with the idle check? I think if this hits th
Done


http://gerrit.cloudera.org:8080/#/c/13306/5/be/src/service/impala-server.cc@2192
PS5, Line 2192:         }
> Missing an and/or?
Done


http://gerrit.cloudera.org:8080/#/c/13306/5/tests/custom_cluster/test_hs2.py
File tests/custom_cluster/test_hs2.py:

http://gerrit.cloudera.org:8080/#/c/13306/5/tests/custom_cluster/test_hs2.py@40
PS5, Line 40:   def test_disconnected_session_timeout(self):
> Would be good to also test interaction with the idle timeout - i.e. if ther
Done


http://gerrit.cloudera.org:8080/#/c/13306/5/tests/hs2/test_hs2.py
File tests/hs2/test_hs2.py:

http://gerrit.cloudera.org:8080/#/c/13306/5/tests/hs2/test_hs2.py@621
PS5, Line 621: remains
> remains
Done



--
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: comment
Gerrit-Change-Id: Ia4555cd9b73db5b4dde92cd4fac4f9bfa3664d78
Gerrit-Change-Number: 13306
Gerrit-PatchSet: 6
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]>
Gerrit-Comment-Date: Thu, 23 May 2019 19:56:34 +0000
Gerrit-HasComments: Yes

Reply via email to