Session::open does not fail over when openSession/requestStatementId fails (only TCP-layer failover)

Open Beginner friendly
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
databases

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.

Description

bug

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().

Dominant language
Rust
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/iotdb-client-rust

All issues in apache/iotdb-client-rust

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.