[Bug] Keep session/operation id consistent between server and engine
- Dominant language
- Scala
- Stars
- 2.4k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
### Search before asking
- [X] I have searched in the [issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) and found no similar issues.
### Describe the bug
This is a regression because it was supported in #1032(only for session id) but broken after #1346, we need to fix this issue to reduce troubleshoot effort between server and engine.
### Affects Version(s)
master/1.7/1.6
### Kyuubi Server Log Output
_No response_
### Kyuubi Engine Log Output
_No response_
### Kyuubi Server Configurations
_No response_
### Kyuubi Engine Configurations
_No response_
### Additional context
Before #1346, the open session process is synchronized,
```
client ===open session===> server ===open session===> engine
```
so the server can wait for the engine to return a remote session id, then reuse it to keep the session id consistent. This is actually the way proposed by #1032.
#1346 changed the open session to async, so we need to reverse the above approach, to let the server generate a session id and pass it to the engine for reuse. This approach is also suited for operation id.
### Are you willing to submit PR?
- [ ] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix.
- [ ] No. I cannot submit a PR at this time.
Contributor guide
Research direction
Trace the server and engine open-session flow, using the behavior described around #1032 and #1346 as the starting point. The work is done when the server-generated session and operation IDs are consistently reused by the engine across the asynchronous flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- backend-api-design, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100