Kafka spout cannot commit past a message that always fails to deserialize

Abierto
#9,078 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@linzch3 ya está trabajando en esto.

Desde el 16/11/2026.

  • #9280 de @linzch3 — abierto

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
java, kafka

Línea de trabajo

Empieza siguiendo la ruta de KafkaSpout.fail, tupleListener.onMaxRetryReached, la progresión de commits de OffsetManager y el comportamiento de getPollablePartitionsInfo para deserializationFailures. Se considera terminado cuando exista un diseño acordado para gestionar los records que no se pueden deserializar permanentemente, incluido si el receiver informa del descarte y si el ConsumerRecord sin procesar se envía como dead letter o se confirma.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug

Follow-up from the review of #9076.

Since #9076, a worker drops a message that deterministically fails to decode instead of dying. The dropped tuple is never acked by its receiver, so with the kafka spout in at-least-once mode its offset never commits. Polling continues past the undecodable record, every later offset stays uncommittable behind it, uncommitted offsets climb to maxUncommittedOffsets (default 10,000,000), and getPollablePartitionsInfo then stops polling the partition: a quiet per-partition stall whose symptom is climbing lag. Before #9076 the same input was a worker crash loop, which also never committed the offset but was loud.

The building blocks for an eventual permanent drop already exist. With a finite maxRetries, once the retry service gives up, KafkaSpout.fail marks the message as acked (the branch that calls tupleListener.onMaxRetryReached) and the OffsetManager lets the commit progress again. But the default is to retry forever, and when the spout gives up it acks blind: it holds the raw ConsumerRecord and could dead-letter it, yet today the record just disappears.

What I think deserves design attention: whether the receiver can tell the spout that a message was dropped as undecodable, since today the failure only shows up as the deserializationFailures metric and worker logs while the spout side just sees a tuple that never gets acked; and whether giving up permanently should dead-letter the raw record rather than ack it silently. Default guidance for maxRetries in the presence of persistent decode failures may be all that is needed.

Lenguaje dominante
Java
Estrellas
6.7k
Forks
4k
Merge medio
1 d 5 h
PR fusionados (30 d)
86

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/storm

Todos los issues de apache/storm

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.