Skip to content

Fix WorkerInstanceKey not forwarded between task queue partitions#9214

Merged
rkannan82 merged 3 commits intomainfrom
kannan/fix-worker-instance-key-forwarding
Feb 6, 2026
Merged

Fix WorkerInstanceKey not forwarded between task queue partitions#9214
rkannan82 merged 3 commits intomainfrom
kannan/fix-worker-instance-key-forwarding

Conversation

@rkannan82
Copy link
Contributor

What changed?

  • When workflow or activity poll requests are forwarded from one partition to another, the WorkerInstanceKey field was not being copied to the forwarded request. This caused the worker's instance key to be lost.
  • WorkerInstanceKey is a new field added to all poll requests. See PR.

Why?

We will be recording the WorkerInstanceKey in the ActivityInfo as part of task matching. This will be used later to send activity cancellation tasks to that worker.

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)

Potential risks

@rkannan82 rkannan82 requested review from a team as code owners February 4, 2026 20:41
@rkannan82 rkannan82 requested a review from dnr February 4, 2026 20:43
@rkannan82 rkannan82 requested a review from dnr February 5, 2026 00:14
When workflow or activity poll requests are forwarded from one partition
to another, the WorkerInstanceKey field was not being copied to the
forwarded request. This caused the worker's instance key to be lost.

Changes:
- Add workerInstanceKey field to pollMetadata struct
- Populate workerInstanceKey from request in PollWorkflowTaskQueue
- Populate workerInstanceKey from request in PollActivityTaskQueue
- Forward workerInstanceKey in Forwarder.ForwardPoll for both task types
- Forward workerInstanceKey in ForwardPollWithTarget (pri_forwarder)
- Add tests to verify WorkerInstanceKey is preserved during forwarding
@rkannan82 rkannan82 force-pushed the kannan/fix-worker-instance-key-forwarding branch from 146ad04 to 07def54 Compare February 5, 2026 00:57
@rkannan82 rkannan82 force-pushed the kannan/fix-worker-instance-key-forwarding branch 2 times, most recently from e1a5a1a to 1fcb0df Compare February 5, 2026 17:35
@rkannan82 rkannan82 force-pushed the kannan/fix-worker-instance-key-forwarding branch from 1fcb0df to 07def54 Compare February 6, 2026 03:09
@rkannan82 rkannan82 merged commit bbcc582 into main Feb 6, 2026
67 checks passed
@rkannan82 rkannan82 deleted the kannan/fix-worker-instance-key-forwarding branch February 6, 2026 23:53
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