[Feature Request]: Dataflow streaming worker should budget GetWork against queued and active work

Offen
#41,928 1 Kommentar 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

@singhmrinal02 arbeitet bereits daran.

Seit 05.12.2026.

  • #41937 von @dcacace-goog — offen
  • #41938 von @dcacace-goog — offen

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
48/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
grpc, java

Rechercherichtung

Read BoundedQueueExecutor and GetWorkBudgetDistributors.distributeEvenly() in the Java Dataflow Streaming Engine worker, then trace how ActiveWorkState tracks queued and in-flight work. Check the streaming_engine_getwork_budgeting experiment and existing worker tests first. Done means the receive thread stays non-blocking and GetWork refills account for active, queued, and in-flight work, with the stated 50% clamp and per-stream cap.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

dataflow java P2
What would you like to happen?

When the Dataflow Streaming Engine worker's BoundedQueueExecutor is full, execute() blocks the GetWork gRPC receive thread. Work items still buffered on the stream can't be registered in ActiveWorkState, so they miss heartbeats, expire on Windmill, and get retried.

GetWork stream budgets also ignore work that is already queued or executing on the worker (GetWorkBudgetDistributors.distributeEvenly() uses a zero active-work budget), so streams keep requesting work while bundles are backed up.

Proposed change, behind the streaming_engine_getwork_budgeting experiment (off by default):

  1. Add a non-blocking reservation path to BoundedQueueExecutor (soft target plus hard cap, tryReserve / executeReserved) so the receive thread never blocks.
  2. Refill GetWork budget based on active, queued and in-flight work, clamping streams once the worker reaches 50% of its target and capping per-stream refills so idle fan-out backends can't hoard budget.
Issue Priority

Priority: 2 (default / most feature requests should be filed as P2)

Issue Components
  • Component: Java SDK
  • Component: Google Cloud Dataflow Runner
Vorherrschende Sprache
Java
Sterne
8.7k
Forks
4.8k
Ø Merge
3 T. 20 Std.
Gemergte PRs (30 T.)
446

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.