Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHistoryEventIDValidator ¶ added in v1.5.7
func NewHistoryEventIDValidator( shardID int32, executionManager persistence.ExecutionManager, ) *historyEventIDValidator
NewHistoryEventIDValidator returns new instance.
func NewMutableStateValidator ¶ added in v1.18.2
func NewMutableStateValidator( registry namespace.Registry, executionDataDurationBuffer dynamicconfig.DurationPropertyFn, ) *mutableStateValidator
NewMutableStateValidator returns new instance.
Types ¶
type MutableState ¶ added in v1.5.7
type MutableState struct {
*persistencespb.WorkflowMutableState
}
type MutableStateValidationResult ¶ added in v1.5.7
type MutableStateValidationResult struct {
// contains filtered or unexported fields
}
type Scavenger ¶
type Scavenger struct {
// contains filtered or unexported fields
}
Scavenger is the type that holds the state for executions scavenger daemon
func NewScavenger ¶
func NewScavenger( activityContext context.Context, numHistoryShards int32, perHostQPS dynamicconfig.IntPropertyFn, perShardQPS dynamicconfig.IntPropertyFn, executionDataDurationBuffer dynamicconfig.DurationPropertyFn, executionTaskWorker dynamicconfig.IntPropertyFn, enableHistoryEventIDValidator dynamicconfig.BoolPropertyFn, executionManager persistence.ExecutionManager, registry namespace.Registry, historyClient historyservice.HistoryServiceClient, adminClient adminservice.AdminServiceClient, metricsHandler metrics.Handler, logger log.Logger, ) *Scavenger
NewScavenger returns an instance of executions scavenger daemon The Scavenger can be started by calling the Start() method on the returned object. Calling the Start() method will result in one complete iteration over all of the open workflow executions in the system. For each executions, will attempt to validate the workflow execution and emit metrics/logs on validation failures.
The scavenger will retry on all persistence errors infinitely and will only stop under two conditions
- either all executions are processed successfully (or)
- Stop() method is called to stop the scavenger
type Validator ¶ added in v1.5.7
type Validator interface {
Validate(ctx context.Context, mutableState *MutableState) ([]MutableStateValidationResult, error)
}