Fix graceful shutdown of the shared worker-command poller

Offen
#3,234 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@yuandrew arbeitet bereits daran.

Seit 24.11.2026.

  • #3235 von @yuandrew — offen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

sdk-java

Expected Behavior

Keep the command poller running until the regular workers finish draining. Then stop issuing new polls and send ShutdownWorker with the command queue name, worker instance key, and Nexus task queue type so the server can complete the outstanding poll.

shutdownNow() and namespaces without graceful poll completion should still interrupt the command poll promptly.

Actual Behavior

WorkerFactory.shutdown() interrupts the shared worker-command poller as soon as shutdown starts, even when the namespace supports workerPollCompleteOnShutdown. This cancels the in-flight PollNexusTaskQueue RPC and can prevent activities that are still draining from receiving cancellation commands.

The Go SDK addressed the same problem in temporalio/sdk-go#2907.

Vorherrschende Sprache
Java
Sterne
447
Forks
278
Ø Merge
3 T. 22 Std.
Gemergte PRs (30 T.)
28

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 temporalio/sdk-java

Alle Issues in temporalio/sdk-java

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

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