Files
tasks/service/matching/loadcause_string_gen.go
Jacob BarzeeandGitHub bb9ccba489 MatchingService force other partitions to load if root partition is l… (#6324)
…oaded

## What changed?
MatchingService supports gRPC ForceLoadTaskQueuePartition. Whenever
matching engine loads a root partition, the RPC is called for all
non-root, non-sticky partitions of the same taskQueue.

## Why?
This addresses a unique situation where a TaskQueue has acquired a
backlog, and has been unloaded because there are no workers polling the
TaskQueue. When a worker comes back online, it can take a series of
polls before it is load balanced to all partitions, forcing them to
load. This can delay non-root partitions from attempting a sync-match
with the poller. Forcing the partitions to load when the root partition
is loaded can prevent this entirely because the root partition will be
forced to load when the poll triggers a sync-match.

## How did you test it?
Start workflow with sleep. Allow worker to handler workflow initially,
then kill it. Wait for partitions to be unloaded. Start worker back up,
watch task get picked up immediately.

## Potential risks
The new gRPC method and triggering code could be implemented incorrectly
and cause a cascade of calls. Worst case scenario would be perpetual
loop from root-partition to root-partition.

Additionally, we could have an unforeseen case where we call this RPC
far more often than necessary. Metrics have been installed to help us
keep an eye on that.

## Documentation
Matching Service documentation has been expanded to cover task queue
partitions.

## Is hotfix candidate?
nope.
2024-08-12 14:03:59 -06:00

33 lines
1013 B
Go

// Code generated by "stringer -type loadCause -trimprefix loadCause -output loadcause_string_gen.go"; DO NOT EDIT.
package matching
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[loadCauseUnspecified-0]
_ = x[loadCauseTask-1]
_ = x[loadCauseQuery-2]
_ = x[loadCauseDescribe-3]
_ = x[loadCauseUserData-4]
_ = x[loadCauseNexusTask-5]
_ = x[loadCausePoll-6]
_ = x[loadCauseOtherRead-7]
_ = x[loadCauseOtherWrite-8]
_ = x[loadCauseForce-9]
}
const _loadCause_name = "UnspecifiedTaskQueryDescribeUserDataNexusTaskPollOtherReadOtherWriteForce"
var _loadCause_index = [...]uint8{0, 11, 15, 20, 28, 36, 45, 49, 58, 68, 73}
func (i loadCause) String() string {
if i < 0 || i >= loadCause(len(_loadCause_index)-1) {
return "loadCause(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _loadCause_name[_loadCause_index[i]:_loadCause_index[i+1]]
}