Skip to content

Commit

Permalink
[KYUUBI #1931] AbstractSession._lastIdleTime should be reset in acq…
Browse files Browse the repository at this point in the history
…uire method

<!--
Thanks for sending a pull request!

Here are some tips for you:
  1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
  2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
  3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->

### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
  1. If you add a feature, you can talk about the use case of it.
  2. If you fix a bug, you can clarify why it is a bug.
-->
`AbstractSession._lastIdleTime` should be reset in acquire method.

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1934 from SteNicholas/KYUUBI-1931.

Closes #1931

cbbd92e [SteNicholas] [KYUUBI #1931] AbstractSession._lastIdleTime should be reset in acquire method.

Authored-by: SteNicholas <programgeek@163.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
  • Loading branch information
SteNicholas authored and pan3793 committed Feb 18, 2022
1 parent 6c6238c commit f7aa0e0
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -58,6 +58,7 @@ abstract class AbstractSession(
if (userAccess) {
_lastAccessTime = System.currentTimeMillis
}
_lastIdleTime = 0
}

private def release(userAccess: Boolean): Unit = {
Expand All @@ -66,8 +67,6 @@ abstract class AbstractSession(
}
if (opHandleSet.isEmpty) {
_lastIdleTime = System.currentTimeMillis
} else {
_lastIdleTime = 0
}
}

Expand Down

0 comments on commit f7aa0e0

Please sign in to comment.