-
Notifications
You must be signed in to change notification settings - Fork 977
Record the session disconnected info into kyuubi session event #7015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| .map(_.asInstanceOf[KyuubiSessionImpl]) | ||
| .flatMap(_.getSessionEvent).foreach { sessionEvent => | ||
| sessionEvent.exception = Some(new KyuubiException( | ||
| s"Session between client and Kyuubi server disconnected without closing properly")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refer:
kyuubi/kyuubi-common/src/main/scala/org/apache/kyuubi/service/TFrontendService.scala
Lines 614 to 632 in d6f07a6
| override def deleteContext(context: ServerContext, in: TProtocol, out: TProtocol): Unit = { | |
| val handle = context.getSessionHandle | |
| if (handle != null) { | |
| info(s"Session [$handle] disconnected without closing properly, close it now") | |
| try { | |
| val needToClose = be.sessionManager.getSession(handle).conf | |
| .getOrElse(SESSION_CLOSE_ON_DISCONNECT.key, "true").toBoolean | |
| if (needToClose) { | |
| be.closeSession(handle) | |
| } else { | |
| warn(s"Session not actually closed because configuration " + | |
| s"${SESSION_CLOSE_ON_DISCONNECT.key} is set to false") | |
| } | |
| } catch { | |
| case e: KyuubiSQLException => | |
| error("Failed closing session", e) | |
| } | |
| } | |
| } |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7015 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 694 694
Lines 42753 42762 +9
Branches 5820 5821 +1
======================================
- Misses 42753 42762 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
cc @pan3793 |
|
cc @pan3793 |
kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiTBinaryFrontendService.scala
Outdated
Show resolved
Hide resolved
wForget
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
…on event ### Why are the changes needed? Currently, if the kyuubi session between client and kyuubi session disconnected without closing properly, it is difficult to debug, and we have to check the kyuubi server log. It is better that, we can record such kind of information into kyuubi session event. ### How was this patch tested? IT. <img width="1264" alt="image" src="https://github.com/user-attachments/assets/d2c5b6d0-6298-46ec-9b73-ce648551120c" /> ### Was this patch authored or co-authored using generative AI tooling? No. Closes #7015 from turboFei/disconnect. Closes #7015 c957092 [Wang, Fei] do not post e465214 [Wang, Fei] nit bca7f9b [Wang, Fei] post 1cf6f8f [Wang, Fei] disconnect Authored-by: Wang, Fei <[email protected]> Signed-off-by: Wang, Fei <[email protected]> (cherry picked from commit ec074fd) Signed-off-by: Wang, Fei <[email protected]>
|
thanks, merged to master and branch-1.10 |
… session event (apache#690) ### Why are the changes needed? Currently, if the kyuubi session between client and kyuubi session disconnected without closing properly, it is difficult to debug, and we have to check the kyuubi server log. It is better that, we can record such kind of information into kyuubi session event. ### How was this patch tested? IT. <img width="1264" alt="image" src="https://github.com/user-attachments/assets/d2c5b6d0-6298-46ec-9b73-ce648551120c" /> ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#7015 from turboFei/disconnect. Closes apache#7015 c957092 [Wang, Fei] do not post e465214 [Wang, Fei] nit bca7f9b [Wang, Fei] post 1cf6f8f [Wang, Fei] disconnect Authored-by: Wang, Fei <[email protected]> Signed-off-by: Wang, Fei <[email protected]>

Why are the changes needed?
Currently, if the kyuubi session between client and kyuubi session disconnected without closing properly, it is difficult to debug, and we have to check the kyuubi server log.
It is better that, we can record such kind of information into kyuubi session event.
How was this patch tested?
IT.
Was this patch authored or co-authored using generative AI tooling?
No.