Documentation
¶
Index ¶
Constants ¶
View Source
const (
// DefaultHistoryMaxAutoResetPoints is the default maximum number for auto reset points
DefaultHistoryMaxAutoResetPoints = 20
)
Variables ¶
View Source
var ( // DefaultTaskPriorityWeight is the default round robin weight used by task scheduler DefaultTaskPriorityWeight = map[int]int{ task.GetTaskPriority(task.HighPriorityClass, task.DefaultPrioritySubclass): 500, task.GetTaskPriority(task.DefaultPriorityClass, task.DefaultPrioritySubclass): 20, task.GetTaskPriority(task.LowPriorityClass, task.DefaultPrioritySubclass): 5, } // DefaultPendingTaskSplitThreshold is the default pending task split threshold DefaultPendingTaskSplitThreshold = map[int]int{ 0: 1000, 1: 10000, } // DefaultStuckTaskSplitThreshold is the default stuck task split threshold DefaultStuckTaskSplitThreshold = map[int]int{ 0: 100, 1: 10000, } )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { NumberOfShards int RPS dynamicconfig.IntPropertyFn MaxIDLengthLimit dynamicconfig.IntPropertyFn PersistenceMaxQPS dynamicconfig.IntPropertyFn PersistenceGlobalMaxQPS dynamicconfig.IntPropertyFn EnableVisibilitySampling dynamicconfig.BoolPropertyFn EnableReadFromClosedExecutionV2 dynamicconfig.BoolPropertyFn VisibilityOpenMaxQPS dynamicconfig.IntPropertyFnWithDomainFilter VisibilityClosedMaxQPS dynamicconfig.IntPropertyFnWithDomainFilter AdvancedVisibilityWritingMode dynamicconfig.StringPropertyFn EmitShardDiffLog dynamicconfig.BoolPropertyFn MaxAutoResetPoints dynamicconfig.IntPropertyFnWithDomainFilter ThrottledLogRPS dynamicconfig.IntPropertyFn EnableStickyQuery dynamicconfig.BoolPropertyFnWithDomainFilter 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 EventsCacheInitialCount dynamicconfig.IntPropertyFn EventsCacheMaxCount dynamicconfig.IntPropertyFn EventsCacheMaxSize dynamicconfig.IntPropertyFn EventsCacheTTL dynamicconfig.DurationPropertyFn EventsCacheGlobalEnable dynamicconfig.BoolPropertyFn EventsCacheGlobalInitialCount dynamicconfig.IntPropertyFn EventsCacheGlobalMaxCount dynamicconfig.IntPropertyFn // 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.IntPropertyFnWithDomainFilter TaskSchedulerType dynamicconfig.IntPropertyFn TaskSchedulerWorkerCount dynamicconfig.IntPropertyFn TaskSchedulerShardWorkerCount dynamicconfig.IntPropertyFn TaskSchedulerQueueSize dynamicconfig.IntPropertyFn TaskSchedulerShardQueueSize dynamicconfig.IntPropertyFn TaskSchedulerDispatcherCount dynamicconfig.IntPropertyFn TaskSchedulerRoundRobinWeights dynamicconfig.MapPropertyFn ActiveTaskRedispatchInterval dynamicconfig.DurationPropertyFn StandbyTaskRedispatchInterval dynamicconfig.DurationPropertyFn TaskRedispatchIntervalJitterCoefficient dynamicconfig.FloatPropertyFn StandbyTaskReReplicationContextTimeout dynamicconfig.DurationPropertyFnWithDomainIDFilter EnableDropStuckTaskByDomainID dynamicconfig.BoolPropertyFnWithDomainIDFilter // QueueProcessor settings QueueProcessorEnableSplit dynamicconfig.BoolPropertyFn QueueProcessorSplitMaxLevel dynamicconfig.IntPropertyFn QueueProcessorEnableRandomSplitByDomainID dynamicconfig.BoolPropertyFnWithDomainIDFilter QueueProcessorRandomSplitProbability dynamicconfig.FloatPropertyFn QueueProcessorEnablePendingTaskSplitByDomainID dynamicconfig.BoolPropertyFnWithDomainIDFilter QueueProcessorPendingTaskSplitThreshold dynamicconfig.MapPropertyFn QueueProcessorEnableStuckTaskSplitByDomainID dynamicconfig.BoolPropertyFnWithDomainIDFilter QueueProcessorStuckTaskSplitThreshold dynamicconfig.MapPropertyFn QueueProcessorSplitLookAheadDurationByDomainID dynamicconfig.DurationPropertyFnWithDomainIDFilter QueueProcessorPollBackoffInterval dynamicconfig.DurationPropertyFn QueueProcessorPollBackoffIntervalJitterCoefficient dynamicconfig.FloatPropertyFn QueueProcessorEnablePersistQueueStates dynamicconfig.BoolPropertyFn QueueProcessorEnableLoadQueueStates dynamicconfig.BoolPropertyFn // 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 TimerProcessorSplitQueueInterval dynamicconfig.DurationPropertyFn TimerProcessorSplitQueueIntervalJitterCoefficient dynamicconfig.FloatPropertyFn TimerProcessorMaxRedispatchQueueSize dynamicconfig.IntPropertyFn 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 TransferProcessorSplitQueueInterval dynamicconfig.DurationPropertyFn TransferProcessorSplitQueueIntervalJitterCoefficient dynamicconfig.FloatPropertyFn TransferProcessorUpdateAckInterval dynamicconfig.DurationPropertyFn TransferProcessorUpdateAckIntervalJitterCoefficient dynamicconfig.FloatPropertyFn TransferProcessorCompleteTransferInterval dynamicconfig.DurationPropertyFn TransferProcessorMaxRedispatchQueueSize dynamicconfig.IntPropertyFn TransferProcessorEnableValidator dynamicconfig.BoolPropertyFn TransferProcessorValidationInterval dynamicconfig.DurationPropertyFn TransferProcessorVisibilityArchivalTimeLimit dynamicconfig.DurationPropertyFn // ReplicatorQueueProcessor settings ReplicatorTaskBatchSize dynamicconfig.IntPropertyFn ReplicatorTaskWorkerCount dynamicconfig.IntPropertyFn ReplicatorTaskMaxRetryCount dynamicconfig.IntPropertyFn ReplicatorReadTaskMaxRetryCount dynamicconfig.IntPropertyFn ReplicatorProcessorMaxPollRPS dynamicconfig.IntPropertyFn ReplicatorProcessorMaxPollInterval dynamicconfig.DurationPropertyFn ReplicatorProcessorMaxPollIntervalJitterCoefficient dynamicconfig.FloatPropertyFn ReplicatorProcessorUpdateAckInterval dynamicconfig.DurationPropertyFn ReplicatorProcessorUpdateAckIntervalJitterCoefficient dynamicconfig.FloatPropertyFn ReplicatorProcessorMaxRedispatchQueueSize dynamicconfig.IntPropertyFn ReplicatorProcessorEnablePriorityTaskProcessor dynamicconfig.BoolPropertyFn ReplicatorProcessorFetchTasksBatchSize dynamicconfig.IntPropertyFnWithShardIDFilter // Persistence settings ExecutionMgrNumConns dynamicconfig.IntPropertyFn HistoryMgrNumConns dynamicconfig.IntPropertyFn // System Limits MaximumBufferedEventsBatch dynamicconfig.IntPropertyFn MaximumSignalsPerExecution dynamicconfig.IntPropertyFnWithDomainFilter // 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.DurationPropertyFnWithDomainFilter // encoding the history events EventEncodingType dynamicconfig.StringPropertyFnWithDomainFilter // whether or not using ParentClosePolicy EnableParentClosePolicy dynamicconfig.BoolPropertyFnWithDomainFilter // 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.IntPropertyFnWithDomainFilter // total number of parentClosePolicy system workflows NumParentClosePolicySystemWorkflows dynamicconfig.IntPropertyFn // Archival settings NumArchiveSystemWorkflows dynamicconfig.IntPropertyFn ArchiveRequestRPS dynamicconfig.IntPropertyFn // Size limit related settings BlobSizeLimitError dynamicconfig.IntPropertyFnWithDomainFilter BlobSizeLimitWarn dynamicconfig.IntPropertyFnWithDomainFilter HistorySizeLimitError dynamicconfig.IntPropertyFnWithDomainFilter HistorySizeLimitWarn dynamicconfig.IntPropertyFnWithDomainFilter HistoryCountLimitError dynamicconfig.IntPropertyFnWithDomainFilter HistoryCountLimitWarn dynamicconfig.IntPropertyFnWithDomainFilter // ValidSearchAttributes is legal indexed keys that can be used in list APIs ValidSearchAttributes dynamicconfig.MapPropertyFn SearchAttributesNumberOfKeysLimit dynamicconfig.IntPropertyFnWithDomainFilter SearchAttributesSizeOfValueLimit dynamicconfig.IntPropertyFnWithDomainFilter SearchAttributesTotalSizeLimit dynamicconfig.IntPropertyFnWithDomainFilter // Decision settings // StickyTTL is to expire a sticky tasklist if no update more than this duration // TODO https://github.com/uber/cadence/issues/2357 StickyTTL dynamicconfig.DurationPropertyFnWithDomainFilter // DecisionHeartbeatTimeout is to timeout behavior of: RespondDecisionTaskComplete with ForceCreateNewDecisionTask == true without any decisions // So that decision will be scheduled to another worker(by clear stickyness) DecisionHeartbeatTimeout dynamicconfig.DurationPropertyFnWithDomainFilter // MaxDecisionStartToCloseSeconds is the StartToCloseSeconds for decision MaxDecisionStartToCloseSeconds dynamicconfig.IntPropertyFnWithDomainFilter DecisionRetryCriticalAttempts dynamicconfig.IntPropertyFn // The following is used by the new RPC replication stack ReplicationTaskFetcherParallelism dynamicconfig.IntPropertyFn ReplicationTaskFetcherAggregationInterval dynamicconfig.DurationPropertyFn ReplicationTaskFetcherTimerJitterCoefficient dynamicconfig.FloatPropertyFn ReplicationTaskFetcherErrorRetryWait dynamicconfig.DurationPropertyFn ReplicationTaskFetcherServiceBusyWait dynamicconfig.DurationPropertyFn ReplicationTaskProcessorErrorRetryWait dynamicconfig.DurationPropertyFnWithShardIDFilter ReplicationTaskProcessorErrorRetryMaxAttempts dynamicconfig.IntPropertyFnWithShardIDFilter ReplicationTaskProcessorErrorSecondRetryWait dynamicconfig.DurationPropertyFnWithShardIDFilter ReplicationTaskProcessorErrorSecondRetryMaxWait dynamicconfig.DurationPropertyFnWithShardIDFilter ReplicationTaskProcessorErrorSecondRetryExpiration dynamicconfig.DurationPropertyFnWithShardIDFilter ReplicationTaskProcessorNoTaskRetryWait dynamicconfig.DurationPropertyFnWithShardIDFilter ReplicationTaskProcessorCleanupInterval dynamicconfig.DurationPropertyFnWithShardIDFilter ReplicationTaskProcessorCleanupJitterCoefficient dynamicconfig.FloatPropertyFnWithShardIDFilter ReplicationTaskProcessorReadHistoryBatchSize dynamicconfig.IntPropertyFn ReplicationTaskProcessorStartWait dynamicconfig.DurationPropertyFnWithShardIDFilter ReplicationTaskProcessorStartWaitJitterCoefficient dynamicconfig.FloatPropertyFnWithShardIDFilter ReplicationTaskProcessorHostQPS dynamicconfig.FloatPropertyFn ReplicationTaskProcessorShardQPS dynamicconfig.FloatPropertyFn ReplicationTaskGenerationQPS dynamicconfig.FloatPropertyFn // The following are used by consistent query EnableConsistentQuery dynamicconfig.BoolPropertyFn EnableConsistentQueryByDomain dynamicconfig.BoolPropertyFnWithDomainFilter MaxBufferedQueryCount dynamicconfig.IntPropertyFn // Data integrity check related config knobs MutableStateChecksumGenProbability dynamicconfig.IntPropertyFnWithDomainFilter MutableStateChecksumVerifyProbability dynamicconfig.IntPropertyFnWithDomainFilter MutableStateChecksumInvalidateBefore dynamicconfig.FloatPropertyFn // Cross DC Replication configuration ReplicationEventsFromCurrentCluster dynamicconfig.BoolPropertyFnWithDomainFilter // Failover marker heartbeat NotifyFailoverMarkerInterval dynamicconfig.DurationPropertyFn NotifyFailoverMarkerTimerJitterCoefficient dynamicconfig.FloatPropertyFn EnableGracefulFailover dynamicconfig.BoolPropertyFn // Allows worker to dispatch activity tasks through local tunnel after decisions are made. This is an performance optimization to skip activity scheduling efforts. EnableActivityLocalDispatchByDomain dynamicconfig.BoolPropertyFnWithDomainFilter ActivityMaxScheduleToStartTimeoutForRetry dynamicconfig.DurationPropertyFnWithDomainFilter // Debugging configurations EnableDebugMode bool // note that this value is initialized once on service start EnableTaskInfoLogByDomainID dynamicconfig.BoolPropertyFnWithDomainIDFilter }
Config represents configuration for cadence-history service
func New ¶
func New(dc *dynamicconfig.Collection, numberOfShards int, storeType string, isAdvancedVisConfigExist bool) *Config
New returns new service config with default values
func (*Config) GetShardID ¶
GetShardID return the corresponding shard ID for a given workflow ID
Click to show internal directories.
Click to hide internal directories.