Skip to content

Backport poller 71a5caa#1259

Open
yuandrew wants to merge 2 commits into
temporalio:backport/poller-shutdown/71a5caafrom
yuandrew:backport-poller-71a5caa
Open

Backport poller 71a5caa#1259
yuandrew wants to merge 2 commits into
temporalio:backport/poller-shutdown/71a5caafrom
yuandrew:backport-poller-71a5caa

Conversation

@yuandrew
Copy link
Copy Markdown
Contributor

@yuandrew yuandrew commented May 12, 2026

What was changed

Back port #1224 (commit 64cb6ed) onto commit 71a5caa to fix poller shutdown for sdk-python 1.26.0

Why?

Back port poller shutdown fix to affected SDKs

Checklist

  1. How was this tested: CI
  2. Any docs updates needed? No

Note

Medium Risk
Changes core worker shutdown sequencing and poll-stream termination behavior; mistakes could cause hangs or premature poll termination during shutdown. Covered by new unit/integration tests but touches concurrency-critical code paths.

Overview
Fixes a graceful worker shutdown deadlock by moving the ShutdownWorker RPC to Worker::initiate_shutdown (spawned in the background and awaited during shutdown()), ensuring the server is signaled to flush in-flight long polls.

Updates poll-stream logic to treat an empty poll response after shutdown has begun as a graceful termination signal (instead of a timeout that causes retry loops), and centralizes namespace capability flags into a new NamespaceCapabilities struct that is exposed via get_namespace_capabilities().

Adds targeted unit/core/integration tests and adjusts dev-server dynamic config and CLI version override to exercise and validate the new shutdown behavior.

Reviewed by Cursor Bugbot for commit d013317. Bugbot is set up for automated code reviews on this repo. Configure here.

@yuandrew yuandrew requested a review from a team as a code owner May 12, 2026 18:11
@yuandrew yuandrew changed the base branch from main to backport/poller-shutdown/71a5caa May 12, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants