[client] NotLeaderOrFollowerException persists when a stale TabletServer endpoint is reused
Los mantenedores suelen responder en 1 día
@BackendArchitectX ya está trabajando en esto.
Desde el 9/9/2026.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- java
- Área
- backend, distributed-systems
Línea de trabajo
Comience por el manejo en el cliente de las solicitudes listOffsets que reciben NotLeaderOrFollowerException y, a continuación, siga la caché de conexiones de server-UID y la ruta de actualización de los metadatos del clúster. Reproduzca la secuencia de endpoint obsoleto descrita en el issue y verifique que la conexión afectada y los metadatos de enrutamiento se invaliden, que los metadatos se actualicen, que los reintentos estén limitados y que un host o puerto cambiado reemplace la conexión almacenada en caché.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Search before asking
- I searched in the issues and found nothing similar.
Fluss version
0.8.0
Please describe the bug 🐞
During a rolling upgrade, a TabletServer may restart with a new endpoint, while its old endpoint is reused by another TabletServer. A client may then keep a cached connection for the original server ID that actually connects to the other TabletServer.
A request such as listOffsets reaches the wrong server and receives NotLeaderOrFollowerException. The current handling completes the future exceptionally without disconnecting the cached connection or forcing a cluster metadata refresh. Subsequent caller-side retries reuse the same connection, making the failure persistent.
This is related to #2097 and #3389. Unlike the transient leader-change case described in #3389, the stale endpoint remains reachable because it now belongs to another TabletServer, so no NetworkException is raised to invalidate the connection.
Steps to reproduce
The following sequence illustrates how the problem occurs rather than requiring a deterministic IP-reuse setup:
- The client caches
server A -> endpoint X. - During a rolling upgrade, server A restarts at endpoint Y, and endpoint X is reused by server B.
- Before its membership metadata is refreshed, the client creates a connection for server A using endpoint X. The connection is cached under server A's UID, but its actual peer is server B.
- A later metadata refresh may update
server A -> endpoint Y, but connection lookup still reuses the existing connection cached by server UID. - Requests for buckets led by server A continue to reach server B and receive
NotLeaderOrFollowerException. - Because the exception does not invalidate or disconnect the cached connection, subsequent retries keep using the wrong connection.
Solution
On NotLeaderOrFollowerException, invalidate the affected routing metadata, disconnect the cached connection for the selected leader, refresh cluster metadata, and retry with a bounded retry count.
Also consider replacing an existing connection when the host or port changes for the same server UID.
Are you willing to submit a PR?
- I'm willing to submit a PR!
- Lenguaje dominante
- Java
- Estrellas
- 2.2k
- Forks
- 646
- Merge medio
- 2 d 28 min
- PR fusionados (30 d)
- 128
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/fluss
-
[lake/iceberg] Reserved write-mode properties can be set and reset through their `iceberg.` keyPosiblemente ocupada @aphenix-r7 la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
[common] Decimal#hashCode is inconsistent with Decimal#equalsPosiblemente ocupada @firasbouzazi la tomó hace 12 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/fluss#4538 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[security] PlainSaslServerProvider conflicts with Hadoop SASL provider causing authentication failurePosiblemente ocupada @xinzhang-hello la tomó hace 18 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
[server] KV snapshot scheduling stops permanently after a transient snapshot-init failurePosiblemente ocupada @zhang-arvin la tomó hace 18 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
apache/fluss#4489 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[docs] Document advertised-resource and ACL principal ignore-case optionsPosiblemente ocupada @EchoLee5 la tomó hace 30 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
Todos los issues de apache/fluss
Issues similares
-
StepExamBenchmarkTest runs a loop and prints a timing but asserts nothingPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertojules
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
open-learning-exchange/myplanet#18199 · 1 comentario ·
Los mantenedores suelen responder en 4 días
-
Authorization 'Artifacts' is shown under category Run instead of Job in Authorization matrixAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Scheme-less stream URLs throw NullPointerException instead of URISyntaxExceptionPosiblemente ocupada @blihio la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
pedroSG94/RootEncoder#2218 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
apache/rocketmq-dashboard#6872 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ADORSYS-GIS/token-status-link#168 ·
Los mantenedores suelen responder en 2 días