Add poller group ID tracking across all poller types#2254
Draft
tconley1428 wants to merge 4 commits intomasterfrom
Draft
Add poller group ID tracking across all poller types#2254tconley1428 wants to merge 4 commits intomasterfrom
tconley1428 wants to merge 4 commits intomasterfrom
Conversation
Integrate poller group assignment across all three poller types. On each poll, the SDK selects a group ID via weighted random distribution from server-provided poller groups and sets it on the request. Groups from poll responses update the tracker. The response poller_group_id is forwarded on RespondQueryTaskCompleted, RespondNexusTaskCompleted, and RespondNexusTaskFailed for proper routing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests cover poll request/response flow for all three poller types, PollerGroupId forwarding on query and nexus respond RPCs, and the GRPC-too-large fallback path. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # internal/internal_nexus_task_poller.go
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.
Summary
pollerGroupTrackerthat distributes poll requests across server-provided poller groups using weighted random selection, prioritizing groups with zero pending pollsPollerGroupIdon poll requests and update groups from poll responsesPollerGroupIdfrom poll responses toRespondQueryTaskCompleted,RespondNexusTaskCompleted, andRespondNexusTaskFailedfor proper routingDepends on API changes from temporalio/api#744
Test plan
pollerGroupTracker(zero-pending prioritization, weighted distribution, release, group updates)weightedRandom(single candidate, zero weights, convergence)PollerGroupIdis empty on first poll, set on subsequent polls for all three poller typesPollerGroupIdforwarding on query responses (success and error paths)PollerGroupIdforwarding on nexus completion and failure (via fullExecutepath)🤖 Generated with Claude Code