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
- Lenguaje dominante
- Rust
- Estrellas
- 1
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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`.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza localizando RedirectCache, SessionConfig, TableSessionPool y SessionPool::acquire_for_device; después, sigue cómo acquire_for_device selecciona las sesiones inactivas y cómo se comparan las sugerencias de redirección. Revisa las pruebas existentes del pool y de redirect, y verifica que se hayan completado los cuatro comportamientos solicitados: coincidencia normalizada, selección de la sugerencia más reciente, valores predeterminados actuales configurables y la API del pool de tablas.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- rust
- Área
- backend-api-design, databases
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Activo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100