yiheng commented on a change in pull request #224: [LIVY-633][Server] session should not be gc-ed for long running queries URL: https://github.com/apache/incubator-livy/pull/224#discussion_r322137333
########## File path: rsc/src/main/java/org/apache/livy/rsc/RSCClient.java ########## @@ -411,6 +424,11 @@ private void handle(ChannelHandlerContext ctx, JobStarted msg) { private void handle(ChannelHandlerContext ctx, ReplState msg) { LOG.trace("Received repl state for {}", msg.state); + // Update last activity timestamp when state change is from busy to idle. + if (SessionState.Busy$.MODULE$.state().equals(replState) && msg != null && Review comment: According to [this](https://github.com/apache/incubator-livy/blob/master/repl/src/main/scala/org/apache/livy/repl/Session.scala#L263), the repl state can be changed to idle or error. However, error is a finished state. So we will check idle here. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services