You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2022/02/18 09:23:49 UTC
[incubator-kyuubi] branch master updated: [KYUUBI #1931] `AbstractSession._lastIdleTime` should be reset in acquire method
This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new f7aa0e0 [KYUUBI #1931] `AbstractSession._lastIdleTime` should be reset in acquire method
f7aa0e0 is described below
commit f7aa0e0662f08e3d467aa644bafd0716e08a0393
Author: SteNicholas <pr...@163.com>
AuthorDate: Fri Feb 18 17:23:39 2022 +0800
[KYUUBI #1931] `AbstractSession._lastIdleTime` should be reset in acquire 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
cbbd92eb [SteNicholas] [KYUUBI #1931] AbstractSession._lastIdleTime should be reset in acquire method.
Authored-by: SteNicholas <pr...@163.com>
Signed-off-by: Cheng Pan <ch...@apache.org>
---
.../src/main/scala/org/apache/kyuubi/session/AbstractSession.scala | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/session/AbstractSession.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/session/AbstractSession.scala
index 7a2e709..4af63dd 100644
--- a/kyuubi-common/src/main/scala/org/apache/kyuubi/session/AbstractSession.scala
+++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/session/AbstractSession.scala
@@ -58,6 +58,7 @@ abstract class AbstractSession(
if (userAccess) {
_lastAccessTime = System.currentTimeMillis
}
+ _lastIdleTime = 0
}
private def release(userAccess: Boolean): Unit = {
@@ -66,8 +67,6 @@ abstract class AbstractSession(
}
if (opHandleSet.isEmpty) {
_lastIdleTime = System.currentTimeMillis
- } else {
- _lastIdleTime = 0
}
}