Cannot recover when any changelog topic partition becomes empty (as a result of some retention policy)

Abierto
#597 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
30/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
kafka, python

Línea de trabajo

Start in faust/tables/recovery.py: the highwater and earliest-offset builders (around lines 387-404 and 655-713) and the standby consistency checks (around lines 492-526). Reproduce by recovering a changelog partition where low equals high, which makes high - 1 nonexistent. Done means recovery completes for both active and standby partitions on an empty changelog partition, with the consistency checks still valid after seeking.

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

Descripción

Checklist

  • I have included information about relevant versions
  • I have verified that the issue persists when using the master branch of Faust.

Steps to reproduce

  • if a topic partition is not empty: low watermark = minimum/earliest available offset, high watermark = maximum/latest available offset +1
  • if a topic partition is empty low watermark = high watermark

A changelog topic can become empty as a result of a Kafka cleanup policy (i.e., time/sized-based retention)
The case when the topic is empty is not handled properly in Faust recovery.

The recovery service needs to replay messages between low watermark (earliest offset) to high watermark - 1 (latest offset). Faust does this for the active and the standby partitions. Afterwards, it runs some consistency checks.

Active partitions

Let's start with the active partitions:

Standby partitions

Moreover, recovering standby partitions has a separate issue in the consistency checks. First, let's see what is the sequence of steps for active partitions such that we can draw a parallel.

Active:

Standby:

The problem is that after seeking the offsets may be updated asynchronously so by the time the consistency checks run they may no longer hold.

Lenguaje dominante
Python
Estrellas
1.9k
Forks
205
Merge medio
2 h 2 min
PR fusionados (30 d)
1

Preparar el entorno

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 faust-streaming/faust

Todos los issues de faust-streaming/faust

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.