Skip to content

Commit

Permalink
Remove no-longer used dynamic configs (cadence-workflow#4843)
Browse files Browse the repository at this point in the history
  • Loading branch information
vytautas-karpavicius authored May 25, 2022
1 parent 856d33f commit 3cfcaea
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 87 deletions.
66 changes: 5 additions & 61 deletions common/dynamicconfig/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,7 @@ const (
// ReplicatorTaskBatchSize is batch size for ReplicatorProcessor
// KeyName: history.replicatorTaskBatchSize
// Value type: Int
// Default value: 100
// Default value: 25
// Allowed filters: N/A
ReplicatorTaskBatchSize
// ReplicatorTaskDeleteBatchSize is batch size for ReplicatorProcessor to delete replication tasks
Expand All @@ -1336,60 +1336,12 @@ const (
// Default value: 4000
// Allowed filters: N/A
ReplicatorTaskDeleteBatchSize
// ReplicatorTaskWorkerCount is number of worker for ReplicatorProcessor
// KeyName: history.replicatorTaskWorkerCount
// Value type: Int
// Default value: 10
// Allowed filters: N/A
ReplicatorTaskWorkerCount
// ReplicatorReadTaskMaxRetryCount is the number of read replication task retry time
// KeyName: history.replicatorReadTaskMaxRetryCount
// Value type: Int
// Default value: 3
// Allowed filters: N/A
ReplicatorReadTaskMaxRetryCount
// ReplicatorProcessorMaxPollRPS is max poll rate per second for ReplicatorProcessor
// KeyName: history.replicatorProcessorMaxPollRPS
// Value type: Int
// Default value: 20
// Allowed filters: N/A
ReplicatorProcessorMaxPollRPS
// ReplicatorProcessorMaxPollInterval is max poll interval for ReplicatorProcessor
// KeyName: history.replicatorProcessorMaxPollInterval
// Value type: Duration
// Default value: 1m (1*time.Minute)
// Allowed filters: N/A
ReplicatorProcessorMaxPollInterval
// ReplicatorProcessorMaxPollIntervalJitterCoefficient is the max poll interval jitter coefficient
// KeyName: history.replicatorProcessorMaxPollIntervalJitterCoefficient
// Value type: Float64
// Default value: 0.15
// Allowed filters: N/A
ReplicatorProcessorMaxPollIntervalJitterCoefficient
// ReplicatorProcessorUpdateAckInterval is update interval for ReplicatorProcessor
// KeyName: history.replicatorProcessorUpdateAckInterval
// Value type: Duration
// Default value: 5s (5*time.Second)
// Allowed filters: N/A
ReplicatorProcessorUpdateAckInterval
// ReplicatorProcessorUpdateAckIntervalJitterCoefficient is the update interval jitter coefficient
// KeyName: history.replicatorProcessorUpdateAckIntervalJitterCoefficient
// Value type: Float64
// Default value: 0.15
// Allowed filters: N/A
ReplicatorProcessorUpdateAckIntervalJitterCoefficient
// ReplicatorProcessorMaxRedispatchQueueSize is the threshold of the number of tasks in the redispatch queue for ReplicatorProcessor
// KeyName: history.replicatorProcessorMaxRedispatchQueueSize
// Value type: Int
// Default value: 10000
// Allowed filters: N/A
ReplicatorProcessorMaxRedispatchQueueSize
// ReplicatorProcessorEnablePriorityTaskProcessor is indicates whether priority task processor should be used for ReplicatorProcessor
// KeyName: history.replicatorProcessorEnablePriorityTaskProcessor
// Value type: Bool
// Default value: false
// Allowed filters: N/A
ReplicatorProcessorEnablePriorityTaskProcessor
// ReplicatorUpperLatency indicates the max allowed replication latency between clusters
// KeyName: history.replicatorUpperLatency
// Value type: Duration
Expand Down Expand Up @@ -2471,18 +2423,10 @@ var Keys = map[Key]string{
CrossClusterFetcherErrorBackoffInterval: "history.crossClusterFetcherErrorBackoffInterval",
CrossClusterFetcherJitterCoefficient: "history.crossClusterFetcherJitterCoefficient",

ReplicatorTaskBatchSize: "history.replicatorTaskBatchSize",
ReplicatorTaskDeleteBatchSize: "history.replicatorTaskDeleteBatchSize",
ReplicatorTaskWorkerCount: "history.replicatorTaskWorkerCount",
ReplicatorReadTaskMaxRetryCount: "history.replicatorReadTaskMaxRetryCount",
ReplicatorProcessorMaxPollRPS: "history.replicatorProcessorMaxPollRPS",
ReplicatorProcessorMaxPollInterval: "history.replicatorProcessorMaxPollInterval",
ReplicatorProcessorMaxPollIntervalJitterCoefficient: "history.replicatorProcessorMaxPollIntervalJitterCoefficient",
ReplicatorProcessorUpdateAckInterval: "history.replicatorProcessorUpdateAckInterval",
ReplicatorProcessorUpdateAckIntervalJitterCoefficient: "history.replicatorProcessorUpdateAckIntervalJitterCoefficient",
ReplicatorProcessorMaxRedispatchQueueSize: "history.replicatorProcessorMaxRedispatchQueueSize",
ReplicatorProcessorEnablePriorityTaskProcessor: "history.replicatorProcessorEnablePriorityTaskProcessor",
ReplicatorUpperLatency: "history.replicatorUpperLatency",
ReplicatorTaskBatchSize: "history.replicatorTaskBatchSize",
ReplicatorTaskDeleteBatchSize: "history.replicatorTaskDeleteBatchSize",
ReplicatorReadTaskMaxRetryCount: "history.replicatorReadTaskMaxRetryCount",
ReplicatorUpperLatency: "history.replicatorUpperLatency",

ExecutionMgrNumConns: "history.executionMgrNumConns",
HistoryMgrNumConns: "history.historyMgrNumConns",
Expand Down
34 changes: 8 additions & 26 deletions service/history/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,19 +184,10 @@ type Config struct {
CrossClusterFetcherJitterCoefficient dynamicconfig.FloatPropertyFn

// ReplicatorQueueProcessor settings
ReplicatorTaskBatchSize dynamicconfig.IntPropertyFn
ReplicatorTaskDeleteBatchSize dynamicconfig.IntPropertyFn
ReplicatorTaskWorkerCount 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
ReplicatorUpperLatency dynamicconfig.DurationPropertyFn
ReplicatorTaskDeleteBatchSize dynamicconfig.IntPropertyFn
ReplicatorReadTaskMaxRetryCount dynamicconfig.IntPropertyFn
ReplicatorProcessorFetchTasksBatchSize dynamicconfig.IntPropertyFnWithShardIDFilter
ReplicatorUpperLatency dynamicconfig.DurationPropertyFn

// Persistence settings
ExecutionMgrNumConns dynamicconfig.IntPropertyFn
Expand Down Expand Up @@ -483,19 +474,10 @@ func New(dc *dynamicconfig.Collection, numberOfShards int, storeType string, isA
CrossClusterFetcherErrorBackoffInterval: dc.GetDurationProperty(dynamicconfig.CrossClusterFetcherServiceBusyBackoffInterval, time.Second),
CrossClusterFetcherJitterCoefficient: dc.GetFloat64Property(dynamicconfig.CrossClusterFetcherJitterCoefficient, 0.15),

ReplicatorTaskBatchSize: dc.GetIntProperty(dynamicconfig.ReplicatorTaskBatchSize, 100),
ReplicatorTaskDeleteBatchSize: dc.GetIntProperty(dynamicconfig.ReplicatorTaskDeleteBatchSize, 4000),
ReplicatorTaskWorkerCount: dc.GetIntProperty(dynamicconfig.ReplicatorTaskWorkerCount, 10),
ReplicatorReadTaskMaxRetryCount: dc.GetIntProperty(dynamicconfig.ReplicatorReadTaskMaxRetryCount, 3),
ReplicatorProcessorMaxPollRPS: dc.GetIntProperty(dynamicconfig.ReplicatorProcessorMaxPollRPS, 20),
ReplicatorProcessorMaxPollInterval: dc.GetDurationProperty(dynamicconfig.ReplicatorProcessorMaxPollInterval, 1*time.Minute),
ReplicatorProcessorMaxPollIntervalJitterCoefficient: dc.GetFloat64Property(dynamicconfig.ReplicatorProcessorMaxPollIntervalJitterCoefficient, 0.15),
ReplicatorProcessorUpdateAckInterval: dc.GetDurationProperty(dynamicconfig.ReplicatorProcessorUpdateAckInterval, 5*time.Second),
ReplicatorProcessorUpdateAckIntervalJitterCoefficient: dc.GetFloat64Property(dynamicconfig.ReplicatorProcessorUpdateAckIntervalJitterCoefficient, 0.15),
ReplicatorProcessorMaxRedispatchQueueSize: dc.GetIntProperty(dynamicconfig.ReplicatorProcessorMaxRedispatchQueueSize, 10000),
ReplicatorProcessorEnablePriorityTaskProcessor: dc.GetBoolProperty(dynamicconfig.ReplicatorProcessorEnablePriorityTaskProcessor, false),
ReplicatorProcessorFetchTasksBatchSize: dc.GetIntPropertyFilteredByShardID(dynamicconfig.ReplicatorTaskBatchSize, 25),
ReplicatorUpperLatency: dc.GetDurationProperty(dynamicconfig.ReplicatorUpperLatency, 40*time.Second),
ReplicatorTaskDeleteBatchSize: dc.GetIntProperty(dynamicconfig.ReplicatorTaskDeleteBatchSize, 4000),
ReplicatorReadTaskMaxRetryCount: dc.GetIntProperty(dynamicconfig.ReplicatorReadTaskMaxRetryCount, 3),
ReplicatorProcessorFetchTasksBatchSize: dc.GetIntPropertyFilteredByShardID(dynamicconfig.ReplicatorTaskBatchSize, 25),
ReplicatorUpperLatency: dc.GetDurationProperty(dynamicconfig.ReplicatorUpperLatency, 40*time.Second),

ExecutionMgrNumConns: dc.GetIntProperty(dynamicconfig.ExecutionMgrNumConns, 50),
HistoryMgrNumConns: dc.GetIntProperty(dynamicconfig.HistoryMgrNumConns, 50),
Expand Down

0 comments on commit 3cfcaea

Please sign in to comment.