You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[KYUUBI #2125] closeSession should avoid sending RPC after openSession fails
### _Why are the changes needed?_
#2125
Now after the `openSession` call fails, `closeSession` is called. But because there is no `_remoteSessionHandle`, the `CloseSession` RPC request fails.
This does not need to send RPC and also increases the complexity of logging.
```
org.apache.kyuubi.KyuubiSQLException: Error while cleaning up the engine resources
at org.apache.kyuubi.KyuubiSQLException$.apply(KyuubiSQLException.scala:69)
at org.apache.kyuubi.session.KyuubiSessionImpl.close(KyuubiSessionImpl.scala:156)
at org.apache.kyuubi.session.KyuubiSessionManager.openSession(KyuubiSessionManager.scala:75)
at org.apache.kyuubi.service.AbstractBackendService.openSession(AbstractBackendService.scala:45)
at org.apache.kyuubi.service.ThriftBinaryFrontendService.getSessionHandle(ThriftBinaryFrontendService.scala:199)
```
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [x] 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#2126 from cxzl25/KYUUBI-2125.
Closes#21252e96f41 [sychen] optimize closeSession
Authored-by: sychen <sychen@trip.com>
Signed-off-by: Kent Yao <yao@apache.org>
(cherry picked from commit 8c85480)
Signed-off-by: Kent Yao <yao@apache.org>
0 commit comments