Documentation ¶
Index ¶
Constants ¶
View Source
const ( TaskHighPriorityClass = iota << numBitsPerLevel TaskDefaultPriorityClass TaskLowPriorityClass )
View Source
const ( TaskHighPrioritySubclass = iota TaskDefaultPrioritySubclass TaskLowPrioritySubclass )
View Source
const (
DefaultHistoryMaxAutoResetPoints = 20
)
Variables ¶
View Source
var DefaultTaskPriorityWeight = map[int]int{ GetTaskPriority(TaskHighPriorityClass, TaskDefaultPrioritySubclass): 200, GetTaskPriority(TaskDefaultPriorityClass, TaskDefaultPrioritySubclass): 100, GetTaskPriority(TaskLowPriorityClass, TaskDefaultPrioritySubclass): 50, }
Functions ¶
func GetTaskPriority ¶
Types ¶
type Config ¶
type Config struct { NumberOfShards int32 RPS dynamicconfig.IntPropertyFn MaxIDLengthLimit dynamicconfig.IntPropertyFn PersistenceMaxQPS dynamicconfig.IntPropertyFn PersistenceGlobalMaxQPS dynamicconfig.IntPropertyFn EnableVisibilitySampling dynamicconfig.BoolPropertyFn VisibilityOpenMaxQPS dynamicconfig.IntPropertyFnWithNamespaceFilter VisibilityClosedMaxQPS dynamicconfig.IntPropertyFnWithNamespaceFilter AdvancedVisibilityWritingMode dynamicconfig.StringPropertyFn EmitShardDiffLog dynamicconfig.BoolPropertyFn MaxAutoResetPoints dynamicconfig.IntPropertyFnWithNamespaceFilter ThrottledLogRPS dynamicconfig.IntPropertyFn EnableStickyQuery dynamicconfig.BoolPropertyFnWithNamespaceFilter ShutdownDrainDuration dynamicconfig.DurationPropertyFn // HistoryCache settings // Change of these configs require shard restart HistoryCacheInitialSize dynamicconfig.IntPropertyFn HistoryCacheMaxSize dynamicconfig.IntPropertyFn HistoryCacheTTL dynamicconfig.DurationPropertyFn // EventsCache settings // Change of these configs require shard restart EventsCacheInitialSize dynamicconfig.IntPropertyFn EventsCacheMaxSize dynamicconfig.IntPropertyFn EventsCacheTTL dynamicconfig.DurationPropertyFn // ShardController settings RangeSizeBits uint AcquireShardInterval dynamicconfig.DurationPropertyFn AcquireShardConcurrency dynamicconfig.IntPropertyFn // the artificial delay added to standby cluster's view of active cluster's time StandbyClusterDelay dynamicconfig.DurationPropertyFn StandbyTaskMissingEventsResendDelay dynamicconfig.DurationPropertyFn StandbyTaskMissingEventsDiscardDelay dynamicconfig.DurationPropertyFn // Task process settings TaskProcessRPS dynamicconfig.IntPropertyFnWithNamespaceFilter EnablePriorityTaskProcessor dynamicconfig.BoolPropertyFn TaskSchedulerType dynamicconfig.IntPropertyFn TaskSchedulerWorkerCount dynamicconfig.IntPropertyFn TaskSchedulerQueueSize dynamicconfig.IntPropertyFn TaskSchedulerRoundRobinWeights dynamicconfig.MapPropertyFn // TimerQueueProcessor settings TimerTaskBatchSize dynamicconfig.IntPropertyFn TimerTaskWorkerCount dynamicconfig.IntPropertyFn TimerTaskMaxRetryCount dynamicconfig.IntPropertyFn TimerProcessorGetFailureRetryCount dynamicconfig.IntPropertyFn TimerProcessorCompleteTimerFailureRetryCount dynamicconfig.IntPropertyFn TimerProcessorUpdateAckInterval dynamicconfig.DurationPropertyFn TimerProcessorUpdateAckIntervalJitterCoefficient dynamicconfig.FloatPropertyFn TimerProcessorCompleteTimerInterval dynamicconfig.DurationPropertyFn TimerProcessorFailoverMaxPollRPS dynamicconfig.IntPropertyFn TimerProcessorMaxPollRPS dynamicconfig.IntPropertyFn TimerProcessorMaxPollInterval dynamicconfig.DurationPropertyFn TimerProcessorMaxPollIntervalJitterCoefficient dynamicconfig.FloatPropertyFn TimerProcessorRedispatchInterval dynamicconfig.DurationPropertyFn TimerProcessorRedispatchIntervalJitterCoefficient dynamicconfig.FloatPropertyFn TimerProcessorMaxRedispatchQueueSize dynamicconfig.IntPropertyFn TimerProcessorEnablePriorityTaskProcessor dynamicconfig.BoolPropertyFn TimerProcessorMaxTimeShift dynamicconfig.DurationPropertyFn TimerProcessorHistoryArchivalSizeLimit dynamicconfig.IntPropertyFn TimerProcessorArchivalTimeLimit dynamicconfig.DurationPropertyFn // TransferQueueProcessor settings TransferTaskBatchSize dynamicconfig.IntPropertyFn TransferTaskWorkerCount dynamicconfig.IntPropertyFn TransferTaskMaxRetryCount dynamicconfig.IntPropertyFn TransferProcessorCompleteTransferFailureRetryCount dynamicconfig.IntPropertyFn TransferProcessorFailoverMaxPollRPS dynamicconfig.IntPropertyFn TransferProcessorMaxPollRPS dynamicconfig.IntPropertyFn TransferProcessorMaxPollInterval dynamicconfig.DurationPropertyFn TransferProcessorMaxPollIntervalJitterCoefficient dynamicconfig.FloatPropertyFn TransferProcessorUpdateAckInterval dynamicconfig.DurationPropertyFn TransferProcessorUpdateAckIntervalJitterCoefficient dynamicconfig.FloatPropertyFn TransferProcessorCompleteTransferInterval dynamicconfig.DurationPropertyFn TransferProcessorRedispatchInterval dynamicconfig.DurationPropertyFn TransferProcessorRedispatchIntervalJitterCoefficient dynamicconfig.FloatPropertyFn TransferProcessorMaxRedispatchQueueSize dynamicconfig.IntPropertyFn TransferProcessorEnablePriorityTaskProcessor dynamicconfig.BoolPropertyFn TransferProcessorVisibilityArchivalTimeLimit dynamicconfig.DurationPropertyFn // ReplicatorQueueProcessor settings ReplicatorTaskBatchSize dynamicconfig.IntPropertyFn ReplicatorTaskWorkerCount dynamicconfig.IntPropertyFn ReplicatorTaskMaxRetryCount dynamicconfig.IntPropertyFn ReplicatorProcessorMaxPollRPS dynamicconfig.IntPropertyFn ReplicatorProcessorMaxPollInterval dynamicconfig.DurationPropertyFn ReplicatorProcessorMaxPollIntervalJitterCoefficient dynamicconfig.FloatPropertyFn ReplicatorProcessorUpdateAckInterval dynamicconfig.DurationPropertyFn ReplicatorProcessorUpdateAckIntervalJitterCoefficient dynamicconfig.FloatPropertyFn ReplicatorProcessorRedispatchInterval dynamicconfig.DurationPropertyFn ReplicatorProcessorRedispatchIntervalJitterCoefficient dynamicconfig.FloatPropertyFn ReplicatorProcessorMaxRedispatchQueueSize dynamicconfig.IntPropertyFn ReplicatorProcessorEnablePriorityTaskProcessor dynamicconfig.BoolPropertyFn ReplicatorProcessorFetchTasksBatchSize dynamicconfig.IntPropertyFn // Persistence settings ExecutionMgrNumConns dynamicconfig.IntPropertyFn HistoryMgrNumConns dynamicconfig.IntPropertyFn // System Limits MaximumBufferedEventsBatch dynamicconfig.IntPropertyFn MaximumSignalsPerExecution dynamicconfig.IntPropertyFnWithNamespaceFilter // ShardUpdateMinInterval the minimal time interval which the shard info can be updated ShardUpdateMinInterval dynamicconfig.DurationPropertyFn // ShardSyncMinInterval the minimal time interval which the shard info should be sync to 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 // Archival settings NumArchiveSystemWorkflows dynamicconfig.IntPropertyFn ArchiveRequestRPS dynamicconfig.IntPropertyFn // Size limit related settings BlobSizeLimitError dynamicconfig.IntPropertyFnWithNamespaceFilter BlobSizeLimitWarn dynamicconfig.IntPropertyFnWithNamespaceFilter HistorySizeLimitError dynamicconfig.IntPropertyFnWithNamespaceFilter HistorySizeLimitWarn dynamicconfig.IntPropertyFnWithNamespaceFilter HistoryCountLimitError dynamicconfig.IntPropertyFnWithNamespaceFilter HistoryCountLimitWarn dynamicconfig.IntPropertyFnWithNamespaceFilter // ValidSearchAttributes is legal indexed keys that can be used in list APIs ValidSearchAttributes dynamicconfig.MapPropertyFn SearchAttributesNumberOfKeysLimit dynamicconfig.IntPropertyFnWithNamespaceFilter SearchAttributesSizeOfValueLimit dynamicconfig.IntPropertyFnWithNamespaceFilter SearchAttributesTotalSizeLimit dynamicconfig.IntPropertyFnWithNamespaceFilter // DefaultActivityRetryOptions specifies the out-of-box retry policy if // none is configured on the Activity by the user. DefaultActivityRetryPolicy dynamicconfig.MapPropertyFnWithNamespaceFilter // DefaultWorkflowRetryPolicy specifies the out-of-box retry policy for // any unset fields on a RetryPolicy configured on a Workflow DefaultWorkflowRetryPolicy dynamicconfig.MapPropertyFnWithNamespaceFilter // Workflow task settings // StickyTTL is to expire a sticky taskqueue if no update more than this duration // TODO https://go.temporal.io/server/issues/2357 StickyTTL dynamicconfig.DurationPropertyFnWithNamespaceFilter // DefaultWorkflowTaskTimeout the default workflow task timeout DefaultWorkflowTaskTimeout dynamicconfig.DurationPropertyFnWithNamespaceFilter // WorkflowTaskHeartbeatTimeout is to timeout behavior of: RespondWorkflowTaskComplete with ForceCreateNewWorkflowTask == true without any workflow tasks // So that workflow task will be scheduled to another worker(by clear stickyness) WorkflowTaskHeartbeatTimeout dynamicconfig.DurationPropertyFnWithNamespaceFilter // The execution timeout a workflow execution defaults to if not specified DefaultWorkflowExecutionTimeout dynamicconfig.DurationPropertyFnWithNamespaceFilter // The run timeout a workflow run defaults to if not specified DefaultWorkflowRunTimeout dynamicconfig.DurationPropertyFnWithNamespaceFilter // Maximum workflow execution timeout permitted by the service MaxWorkflowExecutionTimeout dynamicconfig.DurationPropertyFnWithNamespaceFilter // Maximum workflow run timeout permitted by the service MaxWorkflowRunTimeout dynamicconfig.DurationPropertyFnWithNamespaceFilter // MaxWorkflowTaskTimeout is the maximum allowed value for a workflow task timeout MaxWorkflowTaskTimeout dynamicconfig.DurationPropertyFnWithNamespaceFilter // The following is used by the new RPC replication stack ReplicationTaskFetcherParallelism dynamicconfig.IntPropertyFn ReplicationTaskFetcherAggregationInterval dynamicconfig.DurationPropertyFn ReplicationTaskFetcherTimerJitterCoefficient dynamicconfig.FloatPropertyFn ReplicationTaskFetcherErrorRetryWait dynamicconfig.DurationPropertyFn ReplicationTaskProcessorErrorRetryWait dynamicconfig.DurationPropertyFnWithShardIDFilter ReplicationTaskProcessorErrorRetryMaxAttempts dynamicconfig.IntPropertyFnWithShardIDFilter ReplicationTaskProcessorNoTaskRetryWait dynamicconfig.DurationPropertyFnWithShardIDFilter ReplicationTaskProcessorCleanupInterval dynamicconfig.DurationPropertyFnWithShardIDFilter ReplicationTaskProcessorCleanupJitterCoefficient dynamicconfig.FloatPropertyFnWithShardIDFilter ReplicationTaskProcessorStartWait dynamicconfig.DurationPropertyFnWithShardIDFilter ReplicationTaskProcessorStartWaitJitterCoefficient dynamicconfig.FloatPropertyFnWithShardIDFilter ReplicationTaskProcessorHostQPS dynamicconfig.FloatPropertyFn ReplicationTaskProcessorShardQPS dynamicconfig.FloatPropertyFn EnableKafkaReplication dynamicconfig.BoolPropertyFn EnableRPCReplication dynamicconfig.BoolPropertyFn EnableCleanupReplicationTask dynamicconfig.BoolPropertyFn // 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 // Crocess DC Replication configuration ReplicationEventsFromCurrentCluster dynamicconfig.BoolPropertyFnWithNamespaceFilter StandbyTaskReReplicationContextTimeout dynamicconfig.DurationPropertyFnWithNamespaceIDFilter EnableDropStuckTaskByNamespaceID dynamicconfig.BoolPropertyFnWithNamespaceIDFilter SkipReapplicationByNamespaceId dynamicconfig.BoolPropertyFnWithNamespaceIDFilter }
Config represents configuration for history service
func NewConfig ¶
func NewConfig(dc *dynamicconfig.Collection, numberOfShards int32, isAdvancedVisConfigExist bool) *Config
NewConfig returns new service config with default values
func NewDynamicConfigForTest ¶
func NewDynamicConfigForTest() *Config
func (*Config) GetShardID ¶
GetShardID return the corresponding shard ID for a given namespaceID and workflowID pair
Click to show internal directories.
Click to hide internal directories.