Skip to content

Backport poller 5f79ef2#1260

Open
yuandrew wants to merge 2 commits into
temporalio:backport/poller-shutdown/5f79ef2from
yuandrew:backport-poller-5f79ef2
Open

Backport poller 5f79ef2#1260
yuandrew wants to merge 2 commits into
temporalio:backport/poller-shutdown/5f79ef2from
yuandrew:backport-poller-5f79ef2

Conversation

@yuandrew
Copy link
Copy Markdown
Contributor

@yuandrew yuandrew commented May 12, 2026

What was changed

Back port #1224 (commit 64cb6ed) onto commit 5f79ef2 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 worker shutdown sequencing and poller termination behavior; mistakes could cause hangs or premature poll termination under load, but changes are scoped and covered by new unit/integration tests.

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

Updates poller streams to treat an empty poll response after shutdown as a graceful-termination signal (instead of a poll timeout to retry), and centralizes namespace capability state in a new exported NamespaceCapabilities.

Adds targeted unit/core/integration/shared tests (and enables the needed server dynamic config) to verify the RPC is sent during initiate and shutdown completes quickly during active timer+activity workloads; also bumps the integration-test CLI override to v1.6.3-serverless.

Reviewed by Cursor Bugbot for commit a627b33. 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:27
@yuandrew yuandrew changed the base branch from main to backport/poller-shutdown/5f79ef2 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