Skip to content

Signal WCI on query dispatch when no pollers available#10574

Draft
smuneebahmad wants to merge 3 commits into
mainfrom
muneeb/wci-query
Draft

Signal WCI on query dispatch when no pollers available#10574
smuneebahmad wants to merge 3 commits into
mainfrom
muneeb/wci-query

Conversation

@smuneebahmad
Copy link
Copy Markdown

What changed?

Update DispatchQueryTask to fire processTaskAddHooks signal when the selected queue has no recent pollers, using the version from syncMatchQueue directly rather than targetVersion from routing config (which can point to the wrong deployment for pinned queries). The hook only fires on non-forwarded queries to avoid duplicate invocations of serverless worker by WCI.

Why?

When Lambda workers are scaled to zero, QueryWorkflow requests were timing out silently with no scale-up signal reaching WCI. Unlike workflow and activity tasks — which have a persistent backlog that WCI polls — queries block synchronously in DispatchQueryTask waiting for a poller, so the existing ProcessTaskAdd hook in AddTask was never reached.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jun 5, 2026

CLA assistant check
All committers have signed the CLA.

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