Redirect/pool: endpoint matching has no normalization, newest hint not preferred, cache TTL/entries not configurable, TableSessionPool lacks acquire_for_device

Open
#9 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust

Research direction

Start by locating RedirectCache, SessionConfig, TableSessionPool, and SessionPool::acquire_for_device, then trace how acquire_for_device selects idle sessions and how redirect hints are compared. Check the existing pool and redirect tests, and verify completion against all four requested behaviors: normalized matching, newest-hint selection, configurable current defaults, and the table-pool API.

Written by the indexing model from the issue text.

Description

enhancement

Smaller redirect/pool issues around acquire_for_device:

  1. Redirect endpoint matching is exact host-string equality with no normalization. Hostname-vs-IP spelling silently disables the optimization on multi-DataNode clusters, with no log line so it is invisible from outside. At minimum the comparison should normalize case/whitespace and resolve hostname-vs-IP where feasible.
  2. When idle sessions hold conflicting hints for one device, the winner is queue position, not recency. RedirectCache already tracks seq/insertion order — prefer the newest hint (this stays within the documented "any idle session" behaviour).
  3. RedirectCache TTL and max_entries are fixed at construction with no SessionConfig knob; this becomes measurable on large batch inserts. Add SessionConfig fields with the current defaults.
  4. TableSessionPool exposes acquire() but not acquire_for_device(), so table-mode users accumulate hints no pool API can consume. Expose the underlying SessionPool::acquire_for_device.
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.