This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch branch-1.3
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
The following commit(s) were added to refs/heads/branch-1.3 by this push:
new ff98d49 [KYUUBI #1318] Increase CONN_OPEN iff openSession is
successful
ff98d49 is described below
commit ff98d49049c61e11e69a1d42b1848352f4a75df4
Author: jiaoqingbo <[email protected]>
AuthorDate: Tue Nov 2 12:46:14 2021 +0800
[KYUUBI #1318] Increase CONN_OPEN iff openSession is successful
<!--
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.
-->
The CONN_OPEN count should be increased when the openSession succeeds,
otherwise, when the open session fails, CONN_FAIL+CONN_OPEN! =CONN_TOTAL
### _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.readthedocs.io/en/latest/develop_tools/testing.html#running-tests)
locally before make a pull request
Closes #1319 from jiaoqingbo/kyuubi2.
Closes #1318
8988aede [jiaoqingbo] [KYUUBI #1318] The CONN_OPEN count should be
increased when the openSession succeeds
Authored-by: jiaoqingbo <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
(cherry picked from commit c78fe427edf3ea2e4d94e9cc1801058818438db3)
Signed-off-by: Cheng Pan <[email protected]>
---
.../src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala
b/kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala
index 536464a..4fb7790 100644
---
a/kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala
+++
b/kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala
@@ -56,12 +56,14 @@ class KyuubiSessionImpl(
override def open(): Unit = {
MetricsSystem.tracing { ms =>
ms.incCount(CONN_TOTAL)
- ms.incCount(MetricRegistry.name(CONN_OPEN, user))
}
super.open()
withZkClient(sessionConf) { zkClient =>
val (host, port) = engine.getOrCreate(zkClient)
openSession(host, port)
+ MetricsSystem.tracing { ms =>
+ ms.incCount(MetricRegistry.name(CONN_OPEN, user))
+ }
}
}