Kafka messages were processed twice after rebalancing

Aperta
#502 0 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
18/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
kafka, python

Direzione di ricerca

The report describes a Faust worker on a 4-partition Kafka topic that reprocesses 3 already-handled messages after a scale-out rebalance. Start by reproducing it with two local Faust workers and a multi-partition topic, then check when offsets are committed relative to the partition revoke and assign callbacks. Done means a test shows no message is handled twice across a rebalance, or the maintainers confirm it is expected under at-least-once delivery.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Tell us what you did to cause something to happen.

I have 1 replica of a faust streaming service that listens to a kafka topic with 4 partitions. This service is currently processing kafka messages when our autoscaler scales it into 2 replicas which causes the rebalancing. Before rebalancing, the first replica processed 3 messages, and after rebalancing, the same 3 kafka messages were reprocessed in the second replica.

Expected behavior

I expect that the 3 messages that were already processed in the first replica should not be reprocessed in the second replica since the these messages should be committed before rebalancing

Actual behavior

These 3 messages were processed twice. The first time in the first replica and the second time in the second replica.

Versions

Python version: 3.7.13
Faust version: 0.10.12
Operating system: Debian GNU/Linux 10
Kafka version: 2.3.1

Lingua principale
Python
Stelle
1.9k
Fork
205
Merge medio
2h 2m
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di faust-streaming/faust

Tutte le issue di faust-streaming/faust

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.