Skip to content

Commit a134cbe

Browse files
committed
Add unit test for history config
1 parent a155019 commit a134cbe

File tree

4 files changed

+359
-310
lines changed

4 files changed

+359
-310
lines changed

common/dynamicconfig/constants.go

Lines changed: 0 additions & 253 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,72 +1034,6 @@ const (
10341034
// Default value: 10000
10351035
// Allowed filters: N/A
10361036
TransferProcessorMaxRedispatchQueueSize
1037-
// CrossClusterTaskBatchSize is the batch size for loading cross cluster tasks from persistence in crossClusterQueueProcessor
1038-
// KeyName: history.crossClusterTaskBatchSize
1039-
// Value type: Int
1040-
// Default value: 100
1041-
// Allowed filters: N/A
1042-
CrossClusterTaskBatchSize
1043-
// CrossClusterTaskDeleteBatchSize is the batch size for deleting cross cluster tasks from persistence in crossClusterQueueProcessor
1044-
// KeyName: history.crossClusterTaskDeleteBatchSize
1045-
// Value type: Int
1046-
// Default value: 4000
1047-
// Allowed filters: N/A
1048-
CrossClusterTaskDeleteBatchSize
1049-
// CrossClusterTaskFetchBatchSize is batch size for dispatching cross cluster tasks to target cluster in crossClusterQueueProcessor
1050-
// KeyName: history.crossClusterTaskFetchBatchSize
1051-
// Value type: Int
1052-
// Default value: 100
1053-
// Allowed filters: ShardID
1054-
CrossClusterTaskFetchBatchSize
1055-
// CrossClusterSourceProcessorMaxPollRPS is max poll rate per second for crossClusterQueueProcessor
1056-
// KeyName: history.crossClusterProcessorMaxPollRPS
1057-
// Value type: Int
1058-
// Default value: 20
1059-
// Allowed filters: N/A
1060-
CrossClusterSourceProcessorMaxPollRPS
1061-
// CrossClusterSourceProcessorCompleteTaskFailureRetryCount is times of retry for failure
1062-
// KeyName: history.crossClusterProcessorCompleteTaskFailureRetryCount
1063-
// Value type: Int
1064-
// Default value: 10
1065-
// Allowed filters: N/A
1066-
CrossClusterSourceProcessorCompleteTaskFailureRetryCount // TODO
1067-
// CrossClusterSourceProcessorMaxRedispatchQueueSize is the threshold of the number of tasks in the redispatch queue for crossClusterQueueProcessor
1068-
// KeyName: history.crossClusterProcessorMaxRedispatchQueueSize
1069-
// Value type: Int
1070-
// Default value: 10000
1071-
// Allowed filters: N/A
1072-
CrossClusterSourceProcessorMaxRedispatchQueueSize
1073-
// CrossClusterSourceProcessorMaxPendingTaskSize is the threshold of the number of ready for polling tasks in crossClusterQueueProcessor,
1074-
// task loading will be stopped when the number is reached
1075-
// KeyName: history.crossClusterSourceProcessorMaxPendingTaskSize
1076-
// Value type: Int
1077-
// Default value: 500
1078-
// Allowed filters: N/A
1079-
CrossClusterSourceProcessorMaxPendingTaskSize
1080-
1081-
// CrossClusterTargetProcessorMaxPendingTasks is the max number of pending tasks in cross cluster task processor
1082-
// note there's one cross cluster task processor per shard per source cluster
1083-
// KeyName: history.crossClusterTargetProcessorMaxPendingTasks
1084-
// Value type: Int
1085-
// Default value: 200
1086-
// Allowed filters: N/A
1087-
CrossClusterTargetProcessorMaxPendingTasks
1088-
// CrossClusterTargetProcessorMaxRetryCount is the max number of retries when executing a cross-cluster task in target cluster
1089-
// KeyName: history.crossClusterTargetProcessorMaxRetryCount
1090-
// Value type: Int
1091-
// Default value: 20
1092-
// Allowed filters: N/A
1093-
CrossClusterTargetProcessorMaxRetryCount
1094-
1095-
// CrossClusterFetcherParallelism is the number of go routines each cross cluster fetcher use
1096-
// note there's one cross cluster task fetcher per host per source cluster
1097-
// KeyName: history.crossClusterFetcherParallelism
1098-
// Value type: Int
1099-
// Default value: 1
1100-
// Allowed filters: N/A
1101-
CrossClusterFetcherParallelism
1102-
11031037
// ReplicatorTaskBatchSize is batch size for ReplicatorProcessor
11041038
// KeyName: history.replicatorTaskBatchSize
11051039
// Value type: Int
@@ -1802,13 +1736,6 @@ const (
18021736
// Default value: false
18031737
// Allowed filters: DomainName
18041738
EnableContextHeaderInVisibility
1805-
// EnableCrossClusterEngine is used as an overall switch for the cross-cluster feature, a feature which, if not enabled
1806-
// can be quite expensive in terms of resources
1807-
// KeyName: history.enableCrossClusterEngine
1808-
// Value type: Bool
1809-
// Default value: false
1810-
// Allowed filters: DomainName
1811-
EnableCrossClusterEngine
18121739
// EnableCrossClusterOperationsForDomain indicates if cross cluster operations can be scheduled for a domain
18131740
// KeyName: history.enableCrossClusterOperations
18141741
// Value type: Bool
@@ -2236,30 +2163,6 @@ const (
22362163
// Default value: 0.15
22372164
// Allowed filters: N/A
22382165
TransferProcessorUpdateAckIntervalJitterCoefficient
2239-
// CrossClusterSourceProcessorMaxPollIntervalJitterCoefficient is the max poll interval jitter coefficient
2240-
// KeyName: history.crossClusterProcessorMaxPollIntervalJitterCoefficient
2241-
// Value type: Float64
2242-
// Default value: 0.15
2243-
// Allowed filters: N/A
2244-
CrossClusterSourceProcessorMaxPollIntervalJitterCoefficient
2245-
// CrossClusterSourceProcessorUpdateAckIntervalJitterCoefficient is the update interval jitter coefficient
2246-
// KeyName: history.crossClusterProcessorUpdateAckIntervalJitterCoefficient
2247-
// Value type: Float64
2248-
// Default value: 0.15
2249-
// Allowed filters: N/A
2250-
CrossClusterSourceProcessorUpdateAckIntervalJitterCoefficient
2251-
// CrossClusterTargetProcessorJitterCoefficient is the jitter coefficient used in cross cluster task processor
2252-
// KeyName: history.crossClusterTargetProcessorJitterCoefficient
2253-
// Value type: Float64
2254-
// Default value: 0.15
2255-
// Allowed filters: N/A
2256-
CrossClusterTargetProcessorJitterCoefficient
2257-
// CrossClusterFetcherJitterCoefficient is the jitter coefficient used in cross cluster task fetcher
2258-
// KeyName: history.crossClusterFetcherJitterCoefficient
2259-
// Value type: Float64
2260-
// Default value: 0.15
2261-
// Allowed filters: N/A
2262-
CrossClusterFetcherJitterCoefficient
22632166
// ReplicationTaskProcessorCleanupJitterCoefficient is the jitter for cleanup timer
22642167
// KeyName: history.ReplicationTaskProcessorCleanupJitterCoefficient
22652168
// Value type: Float64
@@ -2676,51 +2579,6 @@ const (
26762579
// Default value: 400ms (400*time.Millisecond)
26772580
// Allowed filters: N/A
26782581
TransferProcessorVisibilityArchivalTimeLimit
2679-
// CrossClusterSourceProcessorMaxPollInterval is max poll interval for crossClusterQueueProcessor
2680-
// KeyName: history.crossClusterProcessorMaxPollInterval
2681-
// Value type: Duration
2682-
// Default value: 1m (1*time.Minute)
2683-
// Allowed filters: N/A
2684-
CrossClusterSourceProcessorMaxPollInterval
2685-
// CrossClusterSourceProcessorUpdateAckInterval is update interval for crossClusterQueueProcessor
2686-
// KeyName: history.crossClusterProcessorUpdateAckInterval
2687-
// Value type: Duration
2688-
// Default value: 30s (30*time.Second)
2689-
// Allowed filters: N/A
2690-
CrossClusterSourceProcessorUpdateAckInterval
2691-
// CrossClusterTargetProcessorTaskWaitInterval is the duration for waiting a cross-cluster task response before responding to source
2692-
// KeyName: history.crossClusterTargetProcessorTaskWaitInterval
2693-
// Value type: Duration
2694-
// Default value: 3s (3*time.Second)
2695-
// Allowed filters: N/A
2696-
CrossClusterTargetProcessorTaskWaitInterval
2697-
// CrossClusterTargetProcessorServiceBusyBackoffInterval is the backoff duration for cross cluster task processor when getting
2698-
// a service busy error when calling source cluster
2699-
// KeyName: history.crossClusterTargetProcessorServiceBusyBackoffInterval
2700-
// Value type: Duration
2701-
// Default value: 5s (5*time.Second)
2702-
// Allowed filters: N/A
2703-
CrossClusterTargetProcessorServiceBusyBackoffInterval
2704-
// CrossClusterFetcherAggregationInterval determines how frequently the fetch requests are sent
2705-
// KeyName: history.crossClusterFetcherAggregationInterval
2706-
// Value type: Duration
2707-
// Default value: 2s (2*time.Second)
2708-
// Allowed filters: N/A
2709-
CrossClusterFetcherAggregationInterval
2710-
// CrossClusterFetcherServiceBusyBackoffInterval is the backoff duration for cross cluster task fetcher when getting
2711-
// a service busy error when calling source cluster
2712-
// KeyName: history.crossClusterFetcherServiceBusyBackoffInterval
2713-
// Value type: Duration
2714-
// Default value: 5s (5*time.Second)
2715-
// Allowed filters: N/A
2716-
CrossClusterFetcherServiceBusyBackoffInterval
2717-
// CrossClusterFetcherServiceBusyBackoffInterval is the backoff duration for cross cluster task fetcher when getting
2718-
// a non-service busy error when calling source cluster
2719-
// KeyName: history.crossClusterFetcherErrorBackoffInterval
2720-
// Value type: Duration
2721-
// Default value: 1s (time.Second)
2722-
// Allowed filters: N/A
2723-
CrossClusterFetcherErrorBackoffInterval
27242582
// ReplicatorUpperLatency indicates the max allowed replication latency between clusters
27252583
// KeyName: history.replicatorUpperLatency
27262584
// Value type: Duration
@@ -3593,57 +3451,6 @@ var IntKeys = map[IntKey]DynamicInt{
35933451
Description: "TransferProcessorMaxRedispatchQueueSize is the threshold of the number of tasks in the redispatch queue for transferQueueProcessor",
35943452
DefaultValue: 10000,
35953453
},
3596-
CrossClusterTaskBatchSize: {
3597-
KeyName: "history.crossClusterTaskBatchSize",
3598-
Description: "CrossClusterTaskBatchSize is the batch size for loading cross cluster tasks from persistence in crossClusterQueueProcessor",
3599-
DefaultValue: 100,
3600-
},
3601-
CrossClusterTaskDeleteBatchSize: {
3602-
KeyName: "history.crossClusterTaskDeleteBatchSize",
3603-
Description: "CrossClusterTaskDeleteBatchSize is the batch size for deleting cross cluster tasks from persistence in crossClusterQueueProcessor",
3604-
DefaultValue: 4000,
3605-
},
3606-
CrossClusterTaskFetchBatchSize: {
3607-
KeyName: "history.crossClusterTaskFetchBatchSize",
3608-
Filters: []Filter{ShardID},
3609-
Description: "CrossClusterTaskFetchBatchSize is batch size for dispatching cross cluster tasks to target cluster in crossClusterQueueProcessor",
3610-
DefaultValue: 100,
3611-
},
3612-
CrossClusterSourceProcessorMaxPollRPS: {
3613-
KeyName: "history.crossClusterSourceProcessorMaxPollRPS",
3614-
Description: "CrossClusterSourceProcessorMaxPollRPS is max poll rate per second for crossClusterQueueProcessor",
3615-
DefaultValue: 20,
3616-
},
3617-
CrossClusterSourceProcessorCompleteTaskFailureRetryCount: {
3618-
KeyName: "history.crossClusterSourceProcessorCompleteTaskFailureRetryCount",
3619-
Description: "CrossClusterSourceProcessorCompleteTaskFailureRetryCount is times of retry for failure",
3620-
DefaultValue: 10,
3621-
},
3622-
CrossClusterSourceProcessorMaxRedispatchQueueSize: {
3623-
KeyName: "history.crossClusterSourceProcessorMaxRedispatchQueueSize",
3624-
Description: "CrossClusterSourceProcessorMaxRedispatchQueueSize is the threshold of the number of tasks in the redispatch queue for crossClusterQueueProcessor",
3625-
DefaultValue: 10000,
3626-
},
3627-
CrossClusterSourceProcessorMaxPendingTaskSize: {
3628-
KeyName: "history.crossClusterSourceProcessorMaxPendingTaskSize",
3629-
Description: "CrossClusterSourceProcessorMaxPendingTaskSize is the threshold of the number of ready for polling tasks in crossClusterQueueProcessor, task loading will be stopped when the number is reached",
3630-
DefaultValue: 500,
3631-
},
3632-
CrossClusterTargetProcessorMaxPendingTasks: {
3633-
KeyName: "history.crossClusterTargetProcessorMaxPendingTasks",
3634-
Description: "CrossClusterTargetProcessorMaxPendingTasks is the max number of pending tasks in cross cluster task processor",
3635-
DefaultValue: 200,
3636-
},
3637-
CrossClusterTargetProcessorMaxRetryCount: {
3638-
KeyName: "history.crossClusterTargetProcessorMaxRetryCount",
3639-
Description: "CrossClusterTargetProcessorMaxRetryCount is the max number of retries when executing a cross-cluster task in target cluster",
3640-
DefaultValue: 20,
3641-
},
3642-
CrossClusterFetcherParallelism: {
3643-
KeyName: "history.crossClusterFetcherParallelism",
3644-
Description: "CrossClusterFetcherParallelism is the number of go routines each cross cluster fetcher use, note there's one cross cluster task fetcher per host per source cluster",
3645-
DefaultValue: 1,
3646-
},
36473454
ReplicatorTaskBatchSize: {
36483455
KeyName: "history.replicatorTaskBatchSize",
36493456
Description: "ReplicatorTaskBatchSize is batch size for ReplicatorProcessor",
@@ -4269,11 +4076,6 @@ var BoolKeys = map[BoolKey]DynamicBool{
42694076
Description: "EnableContextHeaderInVisibility is key for enable context header in visibility",
42704077
DefaultValue: false,
42714078
},
4272-
EnableCrossClusterEngine: {
4273-
KeyName: "history.enableCrossClusterEngine",
4274-
Description: "an overall toggle for the cross-cluster domain feature",
4275-
DefaultValue: false,
4276-
},
42774079
EnableCrossClusterOperationsForDomain: {
42784080
KeyName: "history.enableCrossClusterOperations",
42794081
Filters: []Filter{DomainName},
@@ -4640,26 +4442,6 @@ var FloatKeys = map[FloatKey]DynamicFloat{
46404442
Description: "TransferProcessorUpdateAckIntervalJitterCoefficient is the update interval jitter coefficient",
46414443
DefaultValue: 0.15,
46424444
},
4643-
CrossClusterSourceProcessorMaxPollIntervalJitterCoefficient: {
4644-
KeyName: "history.crossClusterSourceProcessorMaxPollIntervalJitterCoefficient",
4645-
Description: "CrossClusterSourceProcessorMaxPollIntervalJitterCoefficient is the max poll interval jitter coefficient",
4646-
DefaultValue: 0.15,
4647-
},
4648-
CrossClusterSourceProcessorUpdateAckIntervalJitterCoefficient: {
4649-
KeyName: "history.crossClusterSourceProcessorUpdateAckIntervalJitterCoefficient",
4650-
Description: "CrossClusterSourceProcessorUpdateAckIntervalJitterCoefficient is the update interval jitter coefficient",
4651-
DefaultValue: 0.15,
4652-
},
4653-
CrossClusterTargetProcessorJitterCoefficient: {
4654-
KeyName: "history.crossClusterTargetProcessorJitterCoefficient",
4655-
Description: "CrossClusterTargetProcessorJitterCoefficient is the jitter coefficient used in cross cluster task processor",
4656-
DefaultValue: 0.15,
4657-
},
4658-
CrossClusterFetcherJitterCoefficient: {
4659-
KeyName: "history.crossClusterFetcherJitterCoefficient",
4660-
Description: "CrossClusterFetcherJitterCoefficient is the jitter coefficient used in cross cluster task fetcher",
4661-
DefaultValue: 0.15,
4662-
},
46634445
ReplicationTaskProcessorCleanupJitterCoefficient: {
46644446
KeyName: "history.ReplicationTaskProcessorCleanupJitterCoefficient",
46654447
Filters: []Filter{ShardID},
@@ -5034,41 +4816,6 @@ var DurationKeys = map[DurationKey]DynamicDuration{
50344816
Description: "TransferProcessorVisibilityArchivalTimeLimit is the upper time limit for archiving visibility records",
50354817
DefaultValue: time.Millisecond * 400,
50364818
},
5037-
CrossClusterSourceProcessorMaxPollInterval: {
5038-
KeyName: "history.crossClusterSourceProcessorMaxPollInterval",
5039-
Description: "CrossClusterSourceProcessorMaxPollInterval is max poll interval for crossClusterQueueProcessor",
5040-
DefaultValue: time.Minute,
5041-
},
5042-
CrossClusterSourceProcessorUpdateAckInterval: {
5043-
KeyName: "history.crossClusterSourceProcessorUpdateAckInterval",
5044-
Description: "CrossClusterSourceProcessorUpdateAckInterval is update interval for crossClusterQueueProcessor",
5045-
DefaultValue: time.Second * 30,
5046-
},
5047-
CrossClusterTargetProcessorTaskWaitInterval: {
5048-
KeyName: "history.crossClusterTargetProcessorTaskWaitInterval",
5049-
Description: "CrossClusterTargetProcessorTaskWaitInterval is the duration for waiting a cross-cluster task response before responding to source",
5050-
DefaultValue: time.Second * 3,
5051-
},
5052-
CrossClusterTargetProcessorServiceBusyBackoffInterval: {
5053-
KeyName: "history.crossClusterTargetProcessorServiceBusyBackoffInterval",
5054-
Description: "CrossClusterTargetProcessorServiceBusyBackoffInterval is the backoff duration for cross cluster task processor when getting a service busy error when calling source cluster",
5055-
DefaultValue: time.Second * 5,
5056-
},
5057-
CrossClusterFetcherAggregationInterval: {
5058-
KeyName: "history.crossClusterFetcherAggregationInterval",
5059-
Description: "CrossClusterFetcherAggregationInterval determines how frequently the fetch requests are sent",
5060-
DefaultValue: time.Second * 2,
5061-
},
5062-
CrossClusterFetcherServiceBusyBackoffInterval: {
5063-
KeyName: "history.crossClusterFetcherServiceBusyBackoffInterval",
5064-
Description: "CrossClusterFetcherServiceBusyBackoffInterval is the backoff duration for cross cluster task fetcher when getting",
5065-
DefaultValue: time.Second * 5,
5066-
},
5067-
CrossClusterFetcherErrorBackoffInterval: {
5068-
KeyName: "history.crossClusterFetcherErrorBackoffInterval",
5069-
Description: "",
5070-
DefaultValue: time.Second,
5071-
},
50724819
ReplicatorUpperLatency: {
50734820
KeyName: "history.replicatorUpperLatency",
50744821
Description: "ReplicatorUpperLatency indicates the max allowed replication latency between clusters",

0 commit comments

Comments
 (0)