[Task]: Spark 4 streaming sibling scans of one unbounded source can disagree on a deadline cut batch

Offen
#40,786 1 Kommentar 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

@tkaymak arbeitet bereits daran.

Seit 25.10.2026.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

Part of #36841. When one unbounded source PCollection feeds two branches of a single streaming query, for example Flatten of a PCollection with itself, Spark plans one MicroBatchScanExec per branch and does not deduplicate streaming relations, so each micro batch opens two readers for the same split. The sibling scan fix that follows #40766 gives the second scan a detached reader restored from the start mark, never cached and writing no marks. The two scans still agree only when the source yields the same records up to the same cut. With the default configuration (maxBatchDurationMillis 500 ms, no record quota) a batch cut by the deadline can end at different records per sibling, so the detached branch can lose or duplicate the tail of that batch while the next batch continues from the cached reader's mark. Bounded inputs via Create that drain within the deadline are exact. Possible fixes are recording the cached scan's cut (record count or end mark) so siblings replay to it, or a per batch buffer keyed by split and epoch shared by all scans of the key.

Vorherrschende Sprache
Java
Sterne
8.7k
Forks
4.8k
Ø Merge
3 T. 16 Std.
Gemergte PRs (30 T.)
445

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus apache/beam

Alle Issues in apache/beam

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.