apache / apache/iotdb-client-rust
Session::open does not fail over when openSession/requestStatementId fails (only TCP-layer failover)
- Dominant language
- Rust
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
`Session::open` only fails over at the TCP layer: the loop over `config.endpoints` opens a `Connection`, but `authenticate()` (openSession + requestStatementId) runs **after** the loop. `reconnect()` does the opposite — it retries connect **and** authenticate for every endpoint.
With a 3-node cluster where one node accepts TCP but fails `openSession` (e.g. overloaded, misconfigured, or wedged by the missing socket timeout), roughly one `open()` in three fails while 2 of 3 nodes are healthy.
Fix: move the `authenticate()` step inside the endpoint loop, mirroring `reconnect()`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at Session::open and compare its endpoint loop with reconnect(). Trace authenticate(), including openSession and requestStatementId, to understand where each failure is handled. Done means authentication failures cause the next configured endpoint to be tried, matching reconnect() behavior; no test file is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100