Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertDynamicConfigValueToWeights(weightsFromDC map[string]interface{}, logger log.Logger) map[tasks.Priority]int
- func ConvertWeightsToDynamicConfigValue(weights map[tasks.Priority]int) map[string]interface{}
- func NewPriorityRateLimiter(rateFn quotas.RateFn) quotas.RequestRateLimiter
- type Config
Constants ¶
View Source
const (
DefaultHistoryMaxAutoResetPoints = 20
)
Variables ¶
View Source
var ( APIToPriority = map[string]int{ "CloseShard": 0, "GetShard": 0, "DeleteWorkflowExecution": 0, "DescribeHistoryHost": 0, "DescribeMutableState": 0, "DescribeWorkflowExecution": 0, "GetDLQMessages": 0, "GetDLQReplicationMessages": 0, "GetMutableState": 0, "GetReplicationMessages": 0, "MergeDLQMessages": 0, "PollMutableState": 0, "PurgeDLQMessages": 0, "QueryWorkflow": 0, "ReapplyEvents": 0, "RebuildMutableState": 0, "RecordActivityTaskHeartbeat": 0, "RecordActivityTaskStarted": 0, "RecordChildExecutionCompleted": 0, "VerifyChildExecutionCompletionRecorded": 0, "RecordWorkflowTaskStarted": 0, "RefreshWorkflowTasks": 0, "RemoveSignalMutableState": 0, "RemoveTask": 0, "ReplicateEventsV2": 0, "RequestCancelWorkflowExecution": 0, "ResetStickyTaskQueue": 0, "ResetWorkflowExecution": 0, "RespondActivityTaskCanceled": 0, "RespondActivityTaskCompleted": 0, "RespondActivityTaskFailed": 0, "RespondWorkflowTaskCompleted": 0, "RespondWorkflowTaskFailed": 0, "ScheduleWorkflowTask": 0, "VerifyFirstWorkflowTaskScheduled": 0, "SignalWithStartWorkflowExecution": 0, "SignalWorkflowExecution": 0, "StartWorkflowExecution": 0, "SyncActivity": 0, "SyncShardStatus": 0, "TerminateWorkflowExecution": 0, "GenerateLastHistoryReplicationTasks": 0, "GetReplicationStatus": 0, "DeleteWorkflowVisibilityRecord": 0, } APIPrioritiesOrdered = []int{0} )
View Source
var DefaultTaskPriorityWeight = map[tasks.Priority]int{ tasks.PriorityHigh: 900, tasks.PriorityMedium: 50, tasks.PriorityLow: 25, }
Functions ¶
func ConvertDynamicConfigValueToWeights ¶ added in v1.17.0
func NewPriorityRateLimiter ¶ added in v1.10.0
func NewPriorityRateLimiter( rateFn quotas.RateFn, ) quotas.RequestRateLimiter
Types ¶
type Config ¶
type Config struct { NumberOfShards int32 DefaultVisibilityIndexName string RPS dynamicconfig.IntPropertyFn MaxIDLengthLimit dynamicconfig.IntPropertyFn PersistenceMaxQPS dynamicconfig.IntPropertyFn PersistenceGlobalMaxQPS dynamicconfig.IntPropertyFn EnablePersistencePriorityRateLimiting dynamicconfig.BoolPropertyFn StandardVisibilityPersistenceMaxReadQPS dynamicconfig.IntPropertyFn StandardVisibilityPersistenceMaxWriteQPS dynamicconfig.IntPropertyFn AdvancedVisibilityPersistenceMaxReadQPS dynamicconfig.IntPropertyFn AdvancedVisibilityPersistenceMaxWriteQPS dynamicconfig.IntPropertyFn AdvancedVisibilityWritingMode dynamicconfig.StringPropertyFn EnableWriteToSecondaryAdvancedVisibility dynamicconfig.BoolPropertyFn 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 // TimerQueueProcessor settings TimerTaskHighPriorityRPS dynamicconfig.IntPropertyFnWithNamespaceFilter TimerTaskBatchSize dynamicconfig.IntPropertyFn TimerTaskWorkerCount dynamicconfig.IntPropertyFn TimerTaskMaxRetryCount dynamicconfig.IntPropertyFn TimerProcessorEnableSingleCursor dynamicconfig.BoolPropertyFn TimerProcessorEnablePriorityTaskScheduler dynamicconfig.BoolPropertyFn TimerProcessorSchedulerWorkerCount dynamicconfig.IntPropertyFn TimerProcessorSchedulerQueueSize dynamicconfig.IntPropertyFn TimerProcessorSchedulerRoundRobinWeights dynamicconfig.MapPropertyFn TimerProcessorCompleteTimerFailureRetryCount dynamicconfig.IntPropertyFn TimerProcessorUpdateAckInterval dynamicconfig.DurationPropertyFn TimerProcessorUpdateAckIntervalJitterCoefficient dynamicconfig.FloatPropertyFn TimerProcessorCompleteTimerInterval dynamicconfig.DurationPropertyFn TimerProcessorFailoverMaxPollRPS dynamicconfig.IntPropertyFn TimerProcessorMaxPollRPS dynamicconfig.IntPropertyFn TimerProcessorMaxPollHostRPS dynamicconfig.IntPropertyFn TimerProcessorMaxPollInterval dynamicconfig.DurationPropertyFn TimerProcessorMaxPollIntervalJitterCoefficient dynamicconfig.FloatPropertyFn TimerProcessorRescheduleInterval dynamicconfig.DurationPropertyFn TimerProcessorRescheduleIntervalJitterCoefficient dynamicconfig.FloatPropertyFn TimerProcessorMaxReschedulerSize dynamicconfig.IntPropertyFn TimerProcessorPollBackoffInterval dynamicconfig.DurationPropertyFn TimerProcessorMaxTimeShift dynamicconfig.DurationPropertyFn TimerProcessorHistoryArchivalSizeLimit dynamicconfig.IntPropertyFn TimerProcessorArchivalTimeLimit dynamicconfig.DurationPropertyFn // TransferQueueProcessor settings TransferTaskHighPriorityRPS dynamicconfig.IntPropertyFnWithNamespaceFilter TransferTaskBatchSize dynamicconfig.IntPropertyFn TransferTaskWorkerCount dynamicconfig.IntPropertyFn TransferTaskMaxRetryCount dynamicconfig.IntPropertyFn TransferProcessorEnableSingleCursor dynamicconfig.BoolPropertyFn TransferProcessorEnablePriorityTaskScheduler dynamicconfig.BoolPropertyFn TransferProcessorSchedulerWorkerCount dynamicconfig.IntPropertyFn TransferProcessorSchedulerQueueSize dynamicconfig.IntPropertyFn TransferProcessorSchedulerRoundRobinWeights dynamicconfig.MapPropertyFn TransferProcessorCompleteTransferFailureRetryCount dynamicconfig.IntPropertyFn TransferProcessorFailoverMaxPollRPS dynamicconfig.IntPropertyFn TransferProcessorMaxPollRPS dynamicconfig.IntPropertyFn TransferProcessorMaxPollHostRPS dynamicconfig.IntPropertyFn TransferProcessorMaxPollInterval dynamicconfig.DurationPropertyFn TransferProcessorMaxPollIntervalJitterCoefficient dynamicconfig.FloatPropertyFn TransferProcessorUpdateAckInterval dynamicconfig.DurationPropertyFn TransferProcessorUpdateAckIntervalJitterCoefficient dynamicconfig.FloatPropertyFn TransferProcessorCompleteTransferInterval dynamicconfig.DurationPropertyFn TransferProcessorRescheduleInterval dynamicconfig.DurationPropertyFn TransferProcessorRescheduleIntervalJitterCoefficient dynamicconfig.FloatPropertyFn TransferProcessorMaxReschedulerSize dynamicconfig.IntPropertyFn TransferProcessorPollBackoffInterval dynamicconfig.DurationPropertyFn TransferProcessorVisibilityArchivalTimeLimit dynamicconfig.DurationPropertyFn // ReplicatorQueueProcessor settings // TODO: clean up unused replicator 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 ReplicatorProcessorRescheduleInterval dynamicconfig.DurationPropertyFn ReplicatorProcessorRescheduleIntervalJitterCoefficient dynamicconfig.FloatPropertyFn ReplicatorProcessorMaxReschedulerSize dynamicconfig.IntPropertyFn ReplicatorProcessorEnablePriorityTaskProcessor dynamicconfig.BoolPropertyFn ReplicatorProcessorFetchTasksBatchSize 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 MemoSizeLimitError dynamicconfig.IntPropertyFnWithNamespaceFilter MemoSizeLimitWarn dynamicconfig.IntPropertyFnWithNamespaceFilter HistorySizeLimitError dynamicconfig.IntPropertyFnWithNamespaceFilter HistorySizeLimitWarn dynamicconfig.IntPropertyFnWithNamespaceFilter HistoryCountLimitError dynamicconfig.IntPropertyFnWithNamespaceFilter HistoryCountLimitWarn 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 // 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 WorkflowTaskCriticalAttempts dynamicconfig.IntPropertyFn WorkflowTaskRetryMaxInterval dynamicconfig.DurationPropertyFn // 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 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 // 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 VisibilityTaskHighPriorityRPS dynamicconfig.IntPropertyFnWithNamespaceFilter VisibilityTaskBatchSize dynamicconfig.IntPropertyFn VisibilityTaskWorkerCount dynamicconfig.IntPropertyFn VisibilityTaskMaxRetryCount dynamicconfig.IntPropertyFn VisibilityProcessorEnablePriorityTaskScheduler dynamicconfig.BoolPropertyFn VisibilityProcessorSchedulerWorkerCount dynamicconfig.IntPropertyFn VisibilityProcessorSchedulerQueueSize dynamicconfig.IntPropertyFn VisibilityProcessorSchedulerRoundRobinWeights dynamicconfig.MapPropertyFn VisibilityProcessorCompleteTaskFailureRetryCount dynamicconfig.IntPropertyFn VisibilityProcessorFailoverMaxPollRPS dynamicconfig.IntPropertyFn VisibilityProcessorMaxPollRPS dynamicconfig.IntPropertyFn VisibilityProcessorMaxPollHostRPS dynamicconfig.IntPropertyFn VisibilityProcessorMaxPollInterval dynamicconfig.DurationPropertyFn VisibilityProcessorMaxPollIntervalJitterCoefficient dynamicconfig.FloatPropertyFn VisibilityProcessorUpdateAckInterval dynamicconfig.DurationPropertyFn VisibilityProcessorUpdateAckIntervalJitterCoefficient dynamicconfig.FloatPropertyFn VisibilityProcessorCompleteTaskInterval dynamicconfig.DurationPropertyFn VisibilityProcessorRescheduleInterval dynamicconfig.DurationPropertyFn VisibilityProcessorRescheduleIntervalJitterCoefficient dynamicconfig.FloatPropertyFn VisibilityProcessorMaxReschedulerSize dynamicconfig.IntPropertyFn VisibilityProcessorPollBackoffInterval dynamicconfig.DurationPropertyFn VisibilityProcessorVisibilityArchivalTimeLimit dynamicconfig.DurationPropertyFn 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 NamespaceCacheRefreshInterval dynamicconfig.DurationPropertyFn }
Config represents configuration for history service
func NewConfig ¶
func NewConfig(dc *dynamicconfig.Collection, numberOfShards int32, isAdvancedVisibilityConfigExist bool, defaultVisibilityIndex string) *Config
NewConfig returns new service config with default values
Click to show internal directories.
Click to hide internal directories.