Auto-enroll pollers into autoscaling on PollerAutoscalingAutoEnroll (Java SDK)#2953
Open
veeral-patel wants to merge 1 commit into
Open
Auto-enroll pollers into autoscaling on PollerAutoscalingAutoEnroll (Java SDK)#2953veeral-patel wants to merge 1 commit into
veeral-patel wants to merge 1 commit into
Conversation
When a namespace advertises the PollerAutoscalingAutoEnroll capability, automatically switch a poller type to poller autoscaling if the user left it at its default (set neither MaxConcurrent<Type>TaskPollers nor a <Type>TaskPollerBehavior). Explicitly configured pollers are untouched. Auto-enroll implies full autoscaling support, so it also enables serverSupportsAutoscaling (scale-down). Applies to workflow, activity, and nexus pollers. The decision is made at worker start(), after namespace capabilities are loaded, by rebuilding each dormant worker's PollerOptions before its poller is created. Per-poller-type eligibility is captured at Worker construction from the raw (pre-defaulting) WorkerOptions and threaded through PollerOptions. Also bumps the temporal/api proto submodule to pick up the poller_autoscaling_auto_enroll namespace capability (api #803).
veeral-patel
marked this pull request as draft
July 15, 2026 21:19
veeral-patel
marked this pull request as ready for review
July 17, 2026 17:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirrors the Go SDK (temporalio/sdk-go#2442).
What
When a namespace advertises the
PollerAutoscalingAutoEnrollcapability, workers automatically use poller autoscaling for any poller type left at its default — i.e. where the user set neitherMaxConcurrent<Type>TaskPollersnor a<Type>TaskPollerBehavior. Explicitly configured pollers are left alone. Applies to workflow, activity, and nexus pollers.How
Workerrecords, per poller type, whether it was left at its default (read from the rawWorkerOptions, before defaults are applied).start()— once namespace capabilities are known — each eligible poller's behavior is swapped to autoscaling before its poller is created.NamespaceCapabilitiestreats it as enablingpollerAutoscalingtoo.Proto
Bumps the
temporal/apisubmodule to pick up thepoller_autoscaling_auto_enrollcapability (api #803).Testing
PollerAutoscalingAutoEnrollTest— the enroll decision (default + capability → autoscaling; capability off, explicit count, or explicit behavior → unchanged).WorkerPollerAutoEnrollEligibilityTest—Workermarks defaults eligible and explicit config ineligible, per type.