configs

package
v1.26.2-125.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OperatorPriority is used to give precedence to calls coming from web UI or tctl
	OperatorPriority = 0
)

Variables

View Source
var (
	APIToPriority = map[string]int{
		"/temporal.server.api.historyservice.v1.HistoryService/CloseShard":                             1,
		"/temporal.server.api.historyservice.v1.HistoryService/GetShard":                               1,
		"/temporal.server.api.historyservice.v1.HistoryService/DeleteWorkflowExecution":                1,
		"/temporal.server.api.historyservice.v1.HistoryService/DescribeHistoryHost":                    1,
		"/temporal.server.api.historyservice.v1.HistoryService/DescribeMutableState":                   1,
		"/temporal.server.api.historyservice.v1.HistoryService/DescribeWorkflowExecution":              1,
		"/temporal.server.api.historyservice.v1.HistoryService/GetDLQMessages":                         1,
		"/temporal.server.api.historyservice.v1.HistoryService/GetDLQReplicationMessages":              1,
		"/temporal.server.api.historyservice.v1.HistoryService/GetMutableState":                        1,
		"/temporal.server.api.historyservice.v1.HistoryService/GetReplicationMessages":                 1,
		"/temporal.server.api.historyservice.v1.HistoryService/ImportWorkflowExecution":                1,
		"/temporal.server.api.historyservice.v1.HistoryService/IsActivityTaskValid":                    1,
		"/temporal.server.api.historyservice.v1.HistoryService/IsWorkflowTaskValid":                    1,
		"/temporal.server.api.historyservice.v1.HistoryService/MergeDLQMessages":                       1,
		"/temporal.server.api.historyservice.v1.HistoryService/PollMutableState":                       1,
		"/temporal.server.api.historyservice.v1.HistoryService/PurgeDLQMessages":                       1,
		"/temporal.server.api.historyservice.v1.HistoryService/QueryWorkflow":                          1,
		"/temporal.server.api.historyservice.v1.HistoryService/ReapplyEvents":                          1,
		"/temporal.server.api.historyservice.v1.HistoryService/RebuildMutableState":                    1,
		"/temporal.server.api.historyservice.v1.HistoryService/RecordActivityTaskHeartbeat":            1,
		"/temporal.server.api.historyservice.v1.HistoryService/RecordActivityTaskStarted":              1,
		"/temporal.server.api.historyservice.v1.HistoryService/RecordChildExecutionCompleted":          1,
		"/temporal.server.api.historyservice.v1.HistoryService/VerifyChildExecutionCompletionRecorded": 1,
		"/temporal.server.api.historyservice.v1.HistoryService/RecordWorkflowTaskStarted":              1,
		"/temporal.server.api.historyservice.v1.HistoryService/RefreshWorkflowTasks":                   1,
		"/temporal.server.api.historyservice.v1.HistoryService/RemoveSignalMutableState":               1,
		"/temporal.server.api.historyservice.v1.HistoryService/RemoveTask":                             1,
		"/temporal.server.api.historyservice.v1.HistoryService/ReplicateEventsV2":                      1,
		"/temporal.server.api.historyservice.v1.HistoryService/ReplicateWorkflowState":                 1,
		"/temporal.server.api.historyservice.v1.HistoryService/RequestCancelWorkflowExecution":         1,
		"/temporal.server.api.historyservice.v1.HistoryService/ResetStickyTaskQueue":                   1,
		"/temporal.server.api.historyservice.v1.HistoryService/ResetWorkflowExecution":                 1,
		"/temporal.server.api.historyservice.v1.HistoryService/RespondActivityTaskCanceled":            1,
		"/temporal.server.api.historyservice.v1.HistoryService/RespondActivityTaskCompleted":           1,
		"/temporal.server.api.historyservice.v1.HistoryService/RespondActivityTaskFailed":              1,
		"/temporal.server.api.historyservice.v1.HistoryService/RespondWorkflowTaskCompleted":           1,
		"/temporal.server.api.historyservice.v1.HistoryService/RespondWorkflowTaskFailed":              1,
		"/temporal.server.api.historyservice.v1.HistoryService/ScheduleWorkflowTask":                   1,
		"/temporal.server.api.historyservice.v1.HistoryService/VerifyFirstWorkflowTaskScheduled":       1,
		"/temporal.server.api.historyservice.v1.HistoryService/SignalWithStartWorkflowExecution":       1,
		"/temporal.server.api.historyservice.v1.HistoryService/SignalWorkflowExecution":                1,
		"/temporal.server.api.historyservice.v1.HistoryService/StartWorkflowExecution":                 1,
		"/temporal.server.api.historyservice.v1.HistoryService/SyncActivity":                           1,
		"/temporal.server.api.historyservice.v1.HistoryService/SyncShardStatus":                        1,
		"/temporal.server.api.historyservice.v1.HistoryService/TerminateWorkflowExecution":             1,
		"/temporal.server.api.historyservice.v1.HistoryService/GenerateLastHistoryReplicationTasks":    1,
		"/temporal.server.api.historyservice.v1.HistoryService/GetReplicationStatus":                   1,
		"/temporal.server.api.historyservice.v1.HistoryService/DeleteWorkflowVisibilityRecord":         1,
		"/temporal.server.api.historyservice.v1.HistoryService/UpdateWorkflowExecution":                1,
		"/temporal.server.api.historyservice.v1.HistoryService/PollWorkflowExecutionUpdate":            1,
		"/temporal.server.api.historyservice.v1.HistoryService/ExecuteMultiOperation":                  1,
		"/temporal.server.api.historyservice.v1.HistoryService/StreamWorkflowReplicationMessages":      1,
		"/temporal.server.api.historyservice.v1.HistoryService/SyncWorkflowState":                      1,
		"/temporal.server.api.historyservice.v1.HistoryService/GetWorkflowExecutionHistory":            1,
		"/temporal.server.api.historyservice.v1.HistoryService/GetWorkflowExecutionHistoryReverse":     1,
		"/temporal.server.api.historyservice.v1.HistoryService/GetWorkflowExecutionRawHistory":         1,
		"/temporal.server.api.historyservice.v1.HistoryService/GetWorkflowExecutionRawHistoryV2":       1,
		"/temporal.server.api.historyservice.v1.HistoryService/ForceDeleteWorkflowExecution":           1,
		"/temporal.server.api.historyservice.v1.HistoryService/GetDLQTasks":                            1,
		"/temporal.server.api.historyservice.v1.HistoryService/DeleteDLQTasks":                         1,
		"/temporal.server.api.historyservice.v1.HistoryService/AddTasks":                               1,
		"/temporal.server.api.historyservice.v1.HistoryService/ListQueues":                             1,
		"/temporal.server.api.historyservice.v1.HistoryService/ListTasks":                              1,
		"/temporal.server.api.historyservice.v1.HistoryService/CompleteNexusOperation":                 1,
		"/temporal.server.api.historyservice.v1.HistoryService/InvokeStateMachineMethod":               1,
		"/temporal.server.api.historyservice.v1.HistoryService/DeepHealthCheck":                        1,
		"/temporal.server.api.historyservice.v1.HistoryService/UpdateActivityOptions":                  1,
		"/temporal.server.api.historyservice.v1.HistoryService/PauseActivity":                          1,
		"/temporal.server.api.historyservice.v1.HistoryService/UnpauseActivity":                        1,
		"/temporal.server.api.historyservice.v1.HistoryService/ResetActivity":                          1,
		"/temporal.server.api.historyservice.v1.HistoryService/UpdateWorkflowExecutionOptions":         1,
	}

	APIPrioritiesOrdered = []int{OperatorPriority, 1}
)
View Source
var (
	DefaultActiveTaskPriorityWeight = map[tasks.Priority]int{
		tasks.PriorityHigh: 10,
		tasks.PriorityLow:  1,
	}

	DefaultStandbyTaskPriorityWeight = map[tasks.Priority]int{

		tasks.PriorityHigh: 1,
		tasks.PriorityLow:  1,
	}
)

Functions

func ConvertDynamicConfigValueToWeights added in v1.17.0

func ConvertDynamicConfigValueToWeights(
	weightsFromDC map[string]interface{},
	logger log.Logger,
) map[tasks.Priority]int

func ConvertWeightsToDynamicConfigValue

func ConvertWeightsToDynamicConfigValue(
	weights map[tasks.Priority]int,
) map[string]interface{}

func NewPriorityRateLimiter added in v1.10.0

func NewPriorityRateLimiter(
	rateFn quotas.RateFn,
	operatorRPSRatio dynamicconfig.FloatPropertyFn,
) quotas.RequestRateLimiter

Types

type Config

type Config struct {
	NumberOfShards int32

	EnableReplicationStream dynamicconfig.BoolPropertyFn
	HistoryReplicationDLQV2 dynamicconfig.BoolPropertyFn

	RPS                                  dynamicconfig.IntPropertyFn
	OperatorRPSRatio                     dynamicconfig.FloatPropertyFn
	MaxIDLengthLimit                     dynamicconfig.IntPropertyFn
	PersistenceMaxQPS                    dynamicconfig.IntPropertyFn
	PersistenceGlobalMaxQPS              dynamicconfig.IntPropertyFn
	PersistenceNamespaceMaxQPS           dynamicconfig.IntPropertyFnWithNamespaceFilter
	PersistenceGlobalNamespaceMaxQPS     dynamicconfig.IntPropertyFnWithNamespaceFilter
	PersistencePerShardNamespaceMaxQPS   dynamicconfig.IntPropertyFnWithNamespaceFilter
	PersistenceDynamicRateLimitingParams dynamicconfig.TypedPropertyFn[dynamicconfig.DynamicRateLimitingParams]
	PersistenceQPSBurstRatio             dynamicconfig.FloatPropertyFn

	VisibilityPersistenceMaxReadQPS       dynamicconfig.IntPropertyFn
	VisibilityPersistenceMaxWriteQPS      dynamicconfig.IntPropertyFn
	EnableReadFromSecondaryVisibility     dynamicconfig.BoolPropertyFnWithNamespaceFilter
	VisibilityEnableShadowReadMode        dynamicconfig.BoolPropertyFn
	SecondaryVisibilityWritingMode        dynamicconfig.StringPropertyFn
	VisibilityDisableOrderByClause        dynamicconfig.BoolPropertyFnWithNamespaceFilter
	VisibilityEnableManualPagination      dynamicconfig.BoolPropertyFnWithNamespaceFilter
	VisibilityAllowList                   dynamicconfig.BoolPropertyFnWithNamespaceFilter
	SuppressErrorSetSystemSearchAttribute dynamicconfig.BoolPropertyFnWithNamespaceFilter

	EmitShardLagLog            dynamicconfig.BoolPropertyFn
	MaxAutoResetPoints         dynamicconfig.IntPropertyFnWithNamespaceFilter
	ThrottledLogRPS            dynamicconfig.IntPropertyFn
	EnableStickyQuery          dynamicconfig.BoolPropertyFnWithNamespaceFilter
	ShutdownDrainDuration      dynamicconfig.DurationPropertyFn
	StartupMembershipJoinDelay dynamicconfig.DurationPropertyFn

	// HistoryCache settings
	// Change of these configs require shard restart
	HistoryCacheLimitSizeBased            bool
	HistoryCacheInitialSize               dynamicconfig.IntPropertyFn
	HistoryShardLevelCacheMaxSize         dynamicconfig.IntPropertyFn
	HistoryShardLevelCacheMaxSizeBytes    dynamicconfig.IntPropertyFn
	HistoryHostLevelCacheMaxSize          dynamicconfig.IntPropertyFn
	HistoryHostLevelCacheMaxSizeBytes     dynamicconfig.IntPropertyFn
	HistoryCacheTTL                       dynamicconfig.DurationPropertyFn
	HistoryCacheNonUserContextLockTimeout dynamicconfig.DurationPropertyFn
	EnableHostLevelHistoryCache           dynamicconfig.BoolPropertyFn
	EnableNexus                           dynamicconfig.BoolPropertyFn
	EnableWorkflowExecutionTimeoutTimer   dynamicconfig.BoolPropertyFn
	EnableTransitionHistory               dynamicconfig.BoolPropertyFn

	// EventsCache settings
	// Change of these configs require shard restart
	EventsShardLevelCacheMaxSizeBytes dynamicconfig.IntPropertyFn
	EventsCacheTTL                    dynamicconfig.DurationPropertyFn
	// Change of these configs require service restart
	EnableHostLevelEventsCache       dynamicconfig.BoolPropertyFn
	EventsHostLevelCacheMaxSizeBytes dynamicconfig.IntPropertyFn

	// ShardController settings
	RangeSizeBits                uint
	AcquireShardInterval         dynamicconfig.DurationPropertyFn
	AcquireShardConcurrency      dynamicconfig.IntPropertyFn
	ShardIOConcurrency           dynamicconfig.IntPropertyFn
	ShardIOTimeout               dynamicconfig.DurationPropertyFn
	ShardLingerOwnershipCheckQPS dynamicconfig.IntPropertyFn
	ShardLingerTimeLimit         dynamicconfig.DurationPropertyFn
	ShardFinalizerTimeout        dynamicconfig.DurationPropertyFn

	HistoryClientOwnershipCachingEnabled dynamicconfig.BoolPropertyFn

	// the artificial delay added to standby cluster's view of active cluster's time
	StandbyClusterDelay                  dynamicconfig.DurationPropertyFn
	StandbyTaskMissingEventsResendDelay  dynamicconfig.DurationPropertyFnWithTaskTypeFilter
	StandbyTaskMissingEventsDiscardDelay dynamicconfig.DurationPropertyFnWithTaskTypeFilter

	QueuePendingTaskCriticalCount    dynamicconfig.IntPropertyFn
	QueueReaderStuckCriticalAttempts dynamicconfig.IntPropertyFn
	QueueCriticalSlicesCount         dynamicconfig.IntPropertyFn
	QueuePendingTaskMaxCount         dynamicconfig.IntPropertyFn
	QueueMaxPredicateSize            dynamicconfig.IntPropertyFn

	TaskDLQEnabled                 dynamicconfig.BoolPropertyFn
	TaskDLQUnexpectedErrorAttempts dynamicconfig.IntPropertyFn
	TaskDLQInternalErrors          dynamicconfig.BoolPropertyFn
	TaskDLQErrorPattern            dynamicconfig.StringPropertyFn

	TaskSchedulerEnableRateLimiter            dynamicconfig.BoolPropertyFn
	TaskSchedulerEnableRateLimiterShadowMode  dynamicconfig.BoolPropertyFn
	TaskSchedulerRateLimiterStartupDelay      dynamicconfig.DurationPropertyFn
	TaskSchedulerGlobalMaxQPS                 dynamicconfig.IntPropertyFn
	TaskSchedulerMaxQPS                       dynamicconfig.IntPropertyFn
	TaskSchedulerGlobalNamespaceMaxQPS        dynamicconfig.IntPropertyFnWithNamespaceFilter
	TaskSchedulerNamespaceMaxQPS              dynamicconfig.IntPropertyFnWithNamespaceFilter
	TaskSchedulerInactiveChannelDeletionDelay dynamicconfig.DurationPropertyFn

	// TimerQueueProcessor settings
	TimerTaskBatchSize                               dynamicconfig.IntPropertyFn
	TimerProcessorSchedulerWorkerCount               dynamicconfig.TypedSubscribable[int]
	TimerProcessorSchedulerActiveRoundRobinWeights   dynamicconfig.MapPropertyFnWithNamespaceFilter
	TimerProcessorSchedulerStandbyRoundRobinWeights  dynamicconfig.MapPropertyFnWithNamespaceFilter
	TimerProcessorUpdateAckInterval                  dynamicconfig.DurationPropertyFn
	TimerProcessorUpdateAckIntervalJitterCoefficient dynamicconfig.FloatPropertyFn
	TimerProcessorMaxPollRPS                         dynamicconfig.IntPropertyFn
	TimerProcessorMaxPollHostRPS                     dynamicconfig.IntPropertyFn
	TimerProcessorMaxPollInterval                    dynamicconfig.DurationPropertyFn
	TimerProcessorMaxPollIntervalJitterCoefficient   dynamicconfig.FloatPropertyFn
	TimerProcessorPollBackoffInterval                dynamicconfig.DurationPropertyFn
	TimerProcessorMaxTimeShift                       dynamicconfig.DurationPropertyFn
	TimerQueueMaxReaderCount                         dynamicconfig.IntPropertyFn
	RetentionTimerJitterDuration                     dynamicconfig.DurationPropertyFn

	MemoryTimerProcessorSchedulerWorkerCount dynamicconfig.TypedSubscribable[int]

	// TransferQueueProcessor settings
	TransferTaskBatchSize                               dynamicconfig.IntPropertyFn
	TransferProcessorSchedulerWorkerCount               dynamicconfig.TypedSubscribable[int]
	TransferProcessorSchedulerActiveRoundRobinWeights   dynamicconfig.MapPropertyFnWithNamespaceFilter
	TransferProcessorSchedulerStandbyRoundRobinWeights  dynamicconfig.MapPropertyFnWithNamespaceFilter
	TransferProcessorMaxPollRPS                         dynamicconfig.IntPropertyFn
	TransferProcessorMaxPollHostRPS                     dynamicconfig.IntPropertyFn
	TransferProcessorMaxPollInterval                    dynamicconfig.DurationPropertyFn
	TransferProcessorMaxPollIntervalJitterCoefficient   dynamicconfig.FloatPropertyFn
	TransferProcessorUpdateAckInterval                  dynamicconfig.DurationPropertyFn
	TransferProcessorUpdateAckIntervalJitterCoefficient dynamicconfig.FloatPropertyFn
	TransferProcessorPollBackoffInterval                dynamicconfig.DurationPropertyFn
	TransferProcessorEnsureCloseBeforeDelete            dynamicconfig.BoolPropertyFn
	TransferQueueMaxReaderCount                         dynamicconfig.IntPropertyFn

	// OutboundQueueProcessor settings
	OutboundTaskBatchSize                               dynamicconfig.IntPropertyFn
	OutboundProcessorMaxPollRPS                         dynamicconfig.IntPropertyFn
	OutboundProcessorMaxPollHostRPS                     dynamicconfig.IntPropertyFn
	OutboundProcessorMaxPollInterval                    dynamicconfig.DurationPropertyFn
	OutboundProcessorMaxPollIntervalJitterCoefficient   dynamicconfig.FloatPropertyFn
	OutboundProcessorUpdateAckInterval                  dynamicconfig.DurationPropertyFn
	OutboundProcessorUpdateAckIntervalJitterCoefficient dynamicconfig.FloatPropertyFn
	OutboundProcessorPollBackoffInterval                dynamicconfig.DurationPropertyFn
	OutboundQueuePendingTaskCriticalCount               dynamicconfig.IntPropertyFn
	OutboundQueuePendingTaskMaxCount                    dynamicconfig.IntPropertyFn
	OutboundQueueMaxPredicateSize                       dynamicconfig.IntPropertyFn
	OutboundQueueMaxReaderCount                         dynamicconfig.IntPropertyFn
	OutboundQueueGroupLimiterBufferSize                 dynamicconfig.IntPropertyFnWithDestinationFilter
	OutboundQueueGroupLimiterConcurrency                dynamicconfig.IntPropertyFnWithDestinationFilter
	OutboundQueueHostSchedulerMaxTaskRPS                dynamicconfig.FloatPropertyFnWithDestinationFilter
	OutboundQueueCircuitBreakerSettings                 dynamicconfig.TypedSubscribableWithDestinationFilter[dynamicconfig.CircuitBreakerSettings]
	OutboundStandbyTaskMissingEventsDiscardDelay        dynamicconfig.DurationPropertyFnWithDestinationFilter
	OutboundStandbyTaskMissingEventsDestinationDownErr  dynamicconfig.BoolPropertyFnWithDestinationFilter

	// ReplicatorQueueProcessor settings
	ReplicatorProcessorMaxPollInterval                  dynamicconfig.DurationPropertyFn
	ReplicatorProcessorMaxPollIntervalJitterCoefficient dynamicconfig.FloatPropertyFn
	ReplicatorProcessorFetchTasksBatchSize              dynamicconfig.IntPropertyFn
	ReplicatorProcessorMaxSkipTaskCount                 dynamicconfig.IntPropertyFn

	// System Limits
	MaximumBufferedEventsBatch       dynamicconfig.IntPropertyFn
	MaximumBufferedEventsSizeInBytes dynamicconfig.IntPropertyFn
	MaximumSignalsPerExecution       dynamicconfig.IntPropertyFnWithNamespaceFilter

	// ShardUpdateMinInterval is the minimum time interval within which the shard info can be updated.
	ShardUpdateMinInterval dynamicconfig.DurationPropertyFn

	// ShardFirstUpdateMinInterval defines how soon _first_ hard update should happen.
	ShardFirstUpdateInterval dynamicconfig.DurationPropertyFn

	// ShardUpdateMinTasksCompleted is the minimum number of tasks which must be completed before the shard info can be updated before
	// history.shardUpdateMinInterval has passed
	ShardUpdateMinTasksCompleted dynamicconfig.IntPropertyFn
	// ShardSyncMinInterval is the minimum time interval within which the shard info can be synced to the remote.
	ShardSyncMinInterval            dynamicconfig.DurationPropertyFn
	ShardSyncTimerJitterCoefficient dynamicconfig.FloatPropertyFn

	// Time to hold a poll request before returning an empty response
	// right now only used by GetMutableState
	LongPollExpirationInterval dynamicconfig.DurationPropertyFnWithNamespaceFilter

	// encoding the history events
	EventEncodingType dynamicconfig.StringPropertyFnWithNamespaceFilter
	// whether or not using ParentClosePolicy
	EnableParentClosePolicy dynamicconfig.BoolPropertyFnWithNamespaceFilter
	// whether or not enable system workers for processing parent close policy task
	EnableParentClosePolicyWorker dynamicconfig.BoolPropertyFn
	// parent close policy will be processed by sys workers(if enabled) if
	// the number of children greater than or equal to this threshold
	ParentClosePolicyThreshold dynamicconfig.IntPropertyFnWithNamespaceFilter
	// total number of parentClosePolicy system workflows
	NumParentClosePolicySystemWorkflows dynamicconfig.IntPropertyFn

	// Size limit related settings
	BlobSizeLimitError                        dynamicconfig.IntPropertyFnWithNamespaceFilter
	BlobSizeLimitWarn                         dynamicconfig.IntPropertyFnWithNamespaceFilter
	MemoSizeLimitError                        dynamicconfig.IntPropertyFnWithNamespaceFilter
	MemoSizeLimitWarn                         dynamicconfig.IntPropertyFnWithNamespaceFilter
	HistorySizeLimitError                     dynamicconfig.IntPropertyFnWithNamespaceFilter
	HistorySizeLimitWarn                      dynamicconfig.IntPropertyFnWithNamespaceFilter
	HistorySizeSuggestContinueAsNew           dynamicconfig.IntPropertyFnWithNamespaceFilter
	HistoryCountLimitError                    dynamicconfig.IntPropertyFnWithNamespaceFilter
	HistoryCountLimitWarn                     dynamicconfig.IntPropertyFnWithNamespaceFilter
	HistoryCountSuggestContinueAsNew          dynamicconfig.IntPropertyFnWithNamespaceFilter
	HistoryMaxPageSize                        dynamicconfig.IntPropertyFnWithNamespaceFilter
	MutableStateActivityFailureSizeLimitError dynamicconfig.IntPropertyFnWithNamespaceFilter
	MutableStateActivityFailureSizeLimitWarn  dynamicconfig.IntPropertyFnWithNamespaceFilter
	MutableStateSizeLimitError                dynamicconfig.IntPropertyFn
	MutableStateSizeLimitWarn                 dynamicconfig.IntPropertyFn
	MutableStateTombstoneCountLimit           dynamicconfig.IntPropertyFn
	NumPendingChildExecutionsLimit            dynamicconfig.IntPropertyFnWithNamespaceFilter
	NumPendingActivitiesLimit                 dynamicconfig.IntPropertyFnWithNamespaceFilter
	NumPendingSignalsLimit                    dynamicconfig.IntPropertyFnWithNamespaceFilter
	NumPendingCancelsRequestLimit             dynamicconfig.IntPropertyFnWithNamespaceFilter

	// DefaultActivityRetryOptions specifies the out-of-box retry policy if
	// none is configured on the Activity by the user.
	DefaultActivityRetryPolicy dynamicconfig.TypedPropertyFnWithNamespaceFilter[retrypolicy.DefaultRetrySettings]

	// DefaultWorkflowRetryPolicy specifies the out-of-box retry policy for
	// any unset fields on a RetryPolicy configured on a Workflow
	DefaultWorkflowRetryPolicy dynamicconfig.TypedPropertyFnWithNamespaceFilter[retrypolicy.DefaultRetrySettings]

	// Workflow task settings
	// DefaultWorkflowTaskTimeout the default workflow task timeout
	DefaultWorkflowTaskTimeout dynamicconfig.DurationPropertyFnWithNamespaceFilter
	// WorkflowTaskHeartbeatTimeout is to timeout behavior of: RespondWorkflowTaskComplete with ForceCreateNewWorkflowTask == true
	// without any commands or messages. After this timeout workflow task will be scheduled to another worker(by clear stickyness).
	WorkflowTaskHeartbeatTimeout                     dynamicconfig.DurationPropertyFnWithNamespaceFilter
	WorkflowTaskCriticalAttempts                     dynamicconfig.IntPropertyFn
	WorkflowTaskRetryMaxInterval                     dynamicconfig.DurationPropertyFn
	DiscardSpeculativeWorkflowTaskMaximumEventsCount dynamicconfig.IntPropertyFn

	// The following is used by the new RPC replication stack
	ReplicationTaskApplyTimeout                          dynamicconfig.DurationPropertyFn
	ReplicationTaskFetcherParallelism                    dynamicconfig.IntPropertyFn
	ReplicationTaskFetcherAggregationInterval            dynamicconfig.DurationPropertyFn
	ReplicationTaskFetcherTimerJitterCoefficient         dynamicconfig.FloatPropertyFn
	ReplicationTaskFetcherErrorRetryWait                 dynamicconfig.DurationPropertyFn
	ReplicationTaskProcessorErrorRetryWait               dynamicconfig.DurationPropertyFnWithShardIDFilter
	ReplicationTaskProcessorErrorRetryBackoffCoefficient dynamicconfig.FloatPropertyFnWithShardIDFilter
	ReplicationTaskProcessorErrorRetryMaxInterval        dynamicconfig.DurationPropertyFnWithShardIDFilter
	ReplicationTaskProcessorErrorRetryMaxAttempts        dynamicconfig.IntPropertyFnWithShardIDFilter
	ReplicationTaskProcessorErrorRetryExpiration         dynamicconfig.DurationPropertyFnWithShardIDFilter
	ReplicationTaskProcessorNoTaskRetryWait              dynamicconfig.DurationPropertyFnWithShardIDFilter
	ReplicationTaskProcessorCleanupInterval              dynamicconfig.DurationPropertyFnWithShardIDFilter
	ReplicationTaskProcessorCleanupJitterCoefficient     dynamicconfig.FloatPropertyFnWithShardIDFilter
	ReplicationTaskProcessorHostQPS                      dynamicconfig.FloatPropertyFn
	ReplicationTaskProcessorShardQPS                     dynamicconfig.FloatPropertyFn
	ReplicationEnableDLQMetrics                          dynamicconfig.BoolPropertyFn
	ReplicationEnableUpdateWithNewTaskMerge              dynamicconfig.BoolPropertyFn
	ReplicationMultipleBatches                           dynamicconfig.BoolPropertyFn

	ReplicationStreamSyncStatusDuration                 dynamicconfig.DurationPropertyFn
	ReplicationProcessorSchedulerQueueSize              dynamicconfig.IntPropertyFn
	ReplicationProcessorSchedulerWorkerCount            dynamicconfig.TypedSubscribable[int]
	ReplicationLowPriorityProcessorSchedulerWorkerCount dynamicconfig.TypedSubscribable[int]
	ReplicationLowPriorityTaskParallelism               dynamicconfig.IntPropertyFn
	EnableReplicationEagerRefreshNamespace              dynamicconfig.BoolPropertyFn
	EnableReplicationTaskBatching                       dynamicconfig.BoolPropertyFn
	EnableReplicateLocalGeneratedEvent                  dynamicconfig.BoolPropertyFn
	EnableReplicationTaskTieredProcessing               dynamicconfig.BoolPropertyFn
	ReplicationStreamSenderHighPriorityQPS              dynamicconfig.IntPropertyFn
	ReplicationStreamSenderLowPriorityQPS               dynamicconfig.IntPropertyFn
	ReplicationReceiverMaxOutstandingTaskCount          dynamicconfig.IntPropertyFn
	ReplicationResendMaxBatchCount                      dynamicconfig.IntPropertyFn
	ReplicationProgressCacheMaxSize                     dynamicconfig.IntPropertyFn
	ReplicationProgressCacheTTL                         dynamicconfig.DurationPropertyFn

	// The following are used by consistent query
	MaxBufferedQueryCount dynamicconfig.IntPropertyFn

	// Data integrity check related config knobs
	MutableStateChecksumGenProbability    dynamicconfig.IntPropertyFnWithNamespaceFilter
	MutableStateChecksumVerifyProbability dynamicconfig.IntPropertyFnWithNamespaceFilter
	MutableStateChecksumInvalidateBefore  dynamicconfig.FloatPropertyFn

	// NDC Replication configuration
	StandbyTaskReReplicationContextTimeout dynamicconfig.DurationPropertyFnWithNamespaceIDFilter

	SkipReapplicationByNamespaceID dynamicconfig.BoolPropertyFnWithNamespaceIDFilter

	// ===== Visibility related =====
	// VisibilityQueueProcessor settings
	VisibilityTaskBatchSize                               dynamicconfig.IntPropertyFn
	VisibilityProcessorSchedulerWorkerCount               dynamicconfig.TypedSubscribable[int]
	VisibilityProcessorSchedulerActiveRoundRobinWeights   dynamicconfig.MapPropertyFnWithNamespaceFilter
	VisibilityProcessorSchedulerStandbyRoundRobinWeights  dynamicconfig.MapPropertyFnWithNamespaceFilter
	VisibilityProcessorMaxPollRPS                         dynamicconfig.IntPropertyFn
	VisibilityProcessorMaxPollHostRPS                     dynamicconfig.IntPropertyFn
	VisibilityProcessorMaxPollInterval                    dynamicconfig.DurationPropertyFn
	VisibilityProcessorMaxPollIntervalJitterCoefficient   dynamicconfig.FloatPropertyFn
	VisibilityProcessorUpdateAckInterval                  dynamicconfig.DurationPropertyFn
	VisibilityProcessorUpdateAckIntervalJitterCoefficient dynamicconfig.FloatPropertyFn
	VisibilityProcessorPollBackoffInterval                dynamicconfig.DurationPropertyFn
	VisibilityProcessorEnsureCloseBeforeDelete            dynamicconfig.BoolPropertyFn
	VisibilityProcessorEnableCloseWorkflowCleanup         dynamicconfig.BoolPropertyFnWithNamespaceFilter
	VisibilityProcessorRelocateAttributesMinBlobSize      dynamicconfig.IntPropertyFnWithNamespaceFilter
	VisibilityQueueMaxReaderCount                         dynamicconfig.IntPropertyFn

	// Disable fetching memo and search attributes from visibility in the event that they were removed
	// from the mutable state in the close execution visibility task clean up.
	DisableFetchRelocatableAttributesFromVisibility dynamicconfig.BoolPropertyFnWithNamespaceFilter

	SearchAttributesNumberOfKeysLimit dynamicconfig.IntPropertyFnWithNamespaceFilter
	SearchAttributesSizeOfValueLimit  dynamicconfig.IntPropertyFnWithNamespaceFilter
	SearchAttributesTotalSizeLimit    dynamicconfig.IntPropertyFnWithNamespaceFilter
	IndexerConcurrency                dynamicconfig.IntPropertyFn
	ESProcessorNumOfWorkers           dynamicconfig.IntPropertyFn
	ESProcessorBulkActions            dynamicconfig.IntPropertyFn // max number of requests in bulk
	ESProcessorBulkSize               dynamicconfig.IntPropertyFn // max total size of bytes in bulk
	ESProcessorFlushInterval          dynamicconfig.DurationPropertyFn
	ESProcessorAckTimeout             dynamicconfig.DurationPropertyFn

	EnableCrossNamespaceCommands  dynamicconfig.BoolPropertyFn
	EnableActivityEagerExecution  dynamicconfig.BoolPropertyFnWithNamespaceFilter
	EnableEagerWorkflowStart      dynamicconfig.BoolPropertyFnWithNamespaceFilter
	NamespaceCacheRefreshInterval dynamicconfig.DurationPropertyFn

	// ArchivalQueueProcessor settings
	ArchivalProcessorSchedulerWorkerCount               dynamicconfig.TypedSubscribable[int]
	ArchivalProcessorMaxPollHostRPS                     dynamicconfig.IntPropertyFn
	ArchivalTaskBatchSize                               dynamicconfig.IntPropertyFn
	ArchivalProcessorPollBackoffInterval                dynamicconfig.DurationPropertyFn
	ArchivalProcessorMaxPollRPS                         dynamicconfig.IntPropertyFn
	ArchivalProcessorMaxPollInterval                    dynamicconfig.DurationPropertyFn
	ArchivalProcessorMaxPollIntervalJitterCoefficient   dynamicconfig.FloatPropertyFn
	ArchivalProcessorUpdateAckInterval                  dynamicconfig.DurationPropertyFn
	ArchivalProcessorUpdateAckIntervalJitterCoefficient dynamicconfig.FloatPropertyFn
	ArchivalProcessorArchiveDelay                       dynamicconfig.DurationPropertyFn
	ArchivalBackendMaxRPS                               dynamicconfig.FloatPropertyFn
	ArchivalQueueMaxReaderCount                         dynamicconfig.IntPropertyFn

	WorkflowExecutionMaxInFlightUpdates dynamicconfig.IntPropertyFnWithNamespaceFilter
	WorkflowExecutionMaxTotalUpdates    dynamicconfig.IntPropertyFnWithNamespaceFilter

	SendRawWorkflowHistory dynamicconfig.BoolPropertyFnWithNamespaceFilter

	WorkflowIdReuseMinimalInterval           dynamicconfig.DurationPropertyFnWithNamespaceFilter
	EnableWorkflowIdReuseStartTimeValidation dynamicconfig.BoolPropertyFnWithNamespaceFilter

	UseExperimentalHsmScheduler dynamicconfig.BoolPropertyFnWithNamespaceFilter
	HsmSchedulerTweakables      dynamicconfig.TypedPropertyFnWithNamespaceFilter[schedulerhsm.Tweakables]

	HealthPersistenceLatencyFailure dynamicconfig.FloatPropertyFn
	HealthPersistenceErrorRatio     dynamicconfig.FloatPropertyFn

	BreakdownMetricsByTaskQueue dynamicconfig.BoolPropertyFnWithTaskQueueFilter

	LogAllReqErrors dynamicconfig.BoolPropertyFnWithNamespaceFilter
}

Config represents configuration for history service

func NewConfig

func NewConfig(
	dc *dynamicconfig.Collection,
	numberOfShards int32,
) *Config

NewConfig returns new service config with default values

func (*Config) GetShardID

func (config *Config) GetShardID(namespaceID namespace.ID, workflowID string) int32

GetShardID return the corresponding shard ID for a given namespaceID and workflowID pair

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL