Files
tasks/api/taskqueue
Shahab TajikandGitHub 31f59bf7aa Evaluate versioning rules in parent partition for forwarded Queries and Nexus tasks (#6388)
## What changed?
<!-- Describe what has changed in this PR -->
When a query is forwarded to parent partition, allow the parent to chose
build ID itself rather than using the one selected by child partition.

## Why?
<!-- Tell your future self why have you made these changes -->
This fixes a race condition in which query comes to the child right
after User Data is updated but before the child partition has the latest
User Data. In that case child may select a stale build ID that no longer
has workers. When forwarding the request to parent, we want to give the
parent a second chance to fix the child's mistake.

This fixes the flakes in the following SDK test:
https://github.com/temporalio/sdk-go/blob/master/test/worker_versioning_test.go#L885

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
Made sure the SDK test passes 10 consecutive times.

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
None.

## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->
None.

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
No.
2024-08-09 14:12:28 -07:00
..