apache / apache/iotdb-client-rust
Redirect/pool: endpoint matching has no normalization, newest hint not preferred, cache TTL/entries not configurable, TableSessionPool lacks acquire_for_device
- Linguagem predominante
- Rust
- Estrelas
- 1
- Forks
- 0
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
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`.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Direção de pesquisa
Comece localizando RedirectCache, SessionConfig, TableSessionPool e SessionPool::acquire_for_device; em seguida, rastreie como acquire_for_device seleciona sessões ociosas e como as dicas de redirecionamento são comparadas. Verifique os testes existentes de pool e redirect e confirme a conclusão em relação aos quatro comportamentos solicitados: correspondência normalizada, seleção da dica mais recente, padrões atuais configuráveis e a API do table-pool.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- rust
- Domínio
- backend-api-design, databases
- Tipo de issue
- Funcionalidade
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Ativa
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 45/100