1011
taskID string,
1012
request *matchingservice.QueryWorkflowRequest,
1014
>
// TODO(dp): if this partition becomes invalid while the query is blocked, we should cancel the match
1015
>
defer pm.sendPartitionCountTrailer(ctx)
1016
>
// query counts as "write" for partition load balancing
1017
>
if err := pm.checkPartitionCounts(ctx, true); err != nil {
1018
return nil, err
1019
}
1021
pm.signalPartitionScaler()
1022
}
1023
1025
>
pm.config.setDefaultPriority(task)
1026
>
1027
>
reredirectTask:
1028
>
firedNoPollerHook := false
1029
>
_, syncMatchQueue, _, _, _, err := pm.getPhysicalQueuesForAdd(ctx,
1030
>
request.VersionDirective,
1031
>
// We do not pass forwardInfo because we want the parent partition to make fresh versioning decision. Note that
1032
>
// forwarded Query/Nexus task requests do not expire rapidly in contrast to forwarded activity/workflow tasks
1033
>
// that only try up to 200ms sync-match. Therefore, to prevent blocking the request on the wrong build ID, its
1034
>
// more important to allow the parent partition to make a fresh versioning decision in case the child partition
1035
>
// did not have up-to-date User Data when selected a dispatch build ID.
1036
>
nil,
1037
>
request.GetQueryRequest().GetExecution().GetRunId(),
1038
>
request.GetQueryRequest().GetExecution().GetWorkflowId(),
1039
>
true,
1040
>
)
1041
>
if err != nil {
1042
return nil, err
1043
}