Skip to content

Commit 6ee8965

Browse files
committed
feat(dynamicconfig): add operational dynamic config store properties
Adds four new dynamic config keys to control the polling cadence and timeouts of the operational dynamic config store (added in a follow-up commit): - system.operationalConfigStorePollInterval (Duration, default 2s) - system.operationalConfigStoreFetchTimeout (Duration, default 2s) - system.operationalConfigStoreUpdateTimeout (Duration, default 2s) - system.operationalConfigStoreUpdateRetryAttempts (Int, default 1) The 2s default puts the operational store at the configstore client's minimum poll interval (configStoreMinPollInterval), enabling sub-2s regional convergence for safety-critical operational config that cannot tolerate the convergence latency of a typical eventually-consistent dynamic config system. The store itself is added in the follow-up commit; defining the keys first lets that commit wire them in without a placeholder defaults step.
1 parent e5ae9bd commit 6ee8965

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

common/dynamicconfig/dynamicproperties/constants.go

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1641,6 +1641,13 @@ const (
16411641
// Allowed filters: DomainName, TaskListName
16421642
HistoryTaskListNiceValue
16431643

1644+
// OperationalConfigStoreUpdateRetryAttempts is the number of attempts
1645+
// to push a value to the operational dynamic config store on conflict.
1646+
// KeyName: system.operationalConfigStoreUpdateRetryAttempts
1647+
// Value type: Int
1648+
// Default value: 1
1649+
OperationalConfigStoreUpdateRetryAttempts
1650+
16441651
// LastIntKey must be the last one in this const group
16451652
LastIntKey
16461653
)
@@ -3331,6 +3338,27 @@ const (
33313338
// Allowed filters: ShardID
33323339
HistoryTaskDLQProcessorInterval
33333340

3341+
// OperationalConfigStorePollInterval controls how often the operational
3342+
// dynamic config store re-reads its snapshot from the primary database.
3343+
// KeyName: system.operationalConfigStorePollInterval
3344+
// Value type: Duration
3345+
// Default value: 2 seconds
3346+
OperationalConfigStorePollInterval
3347+
3348+
// OperationalConfigStoreFetchTimeout is the per-call timeout used when
3349+
// fetching the operational dynamic config snapshot from the primary database.
3350+
// KeyName: system.operationalConfigStoreFetchTimeout
3351+
// Value type: Duration
3352+
// Default value: 2 seconds
3353+
OperationalConfigStoreFetchTimeout
3354+
3355+
// OperationalConfigStoreUpdateTimeout is the per-call timeout used when
3356+
// writing an operational dynamic config snapshot to the primary database.
3357+
// KeyName: system.operationalConfigStoreUpdateTimeout
3358+
// Value type: Duration
3359+
// Default value: 2 seconds
3360+
OperationalConfigStoreUpdateTimeout
3361+
33343362
// LastDurationKey must be the last one in this const group
33353363
LastDurationKey
33363364
)
@@ -4534,6 +4562,11 @@ var IntKeys = map[IntKey]DynamicInt{
45344562
DefaultValue: 0,
45354563
Filters: []Filter{DomainName, TaskListName},
45364564
},
4565+
OperationalConfigStoreUpdateRetryAttempts: {
4566+
KeyName: "system.operationalConfigStoreUpdateRetryAttempts",
4567+
Description: "Number of attempts to push a value to the operational dynamic config store on conflict",
4568+
DefaultValue: 1,
4569+
},
45374570
}
45384571

45394572
var BoolKeys = map[BoolKey]DynamicBool{
@@ -6004,6 +6037,21 @@ var DurationKeys = map[DurationKey]DynamicDuration{
60046037
Description: "HistoryTaskDLQProcessorInterval is the interval for background processing of the History Task DLQ",
60056038
DefaultValue: time.Minute * 30,
60066039
},
6040+
OperationalConfigStorePollInterval: {
6041+
KeyName: "system.operationalConfigStorePollInterval",
6042+
Description: "How often the operational dynamic config store re-reads its snapshot from the primary database",
6043+
DefaultValue: time.Second * 2,
6044+
},
6045+
OperationalConfigStoreFetchTimeout: {
6046+
KeyName: "system.operationalConfigStoreFetchTimeout",
6047+
Description: "Per-call timeout for fetching the operational dynamic config snapshot from the primary database",
6048+
DefaultValue: time.Second * 2,
6049+
},
6050+
OperationalConfigStoreUpdateTimeout: {
6051+
KeyName: "system.operationalConfigStoreUpdateTimeout",
6052+
Description: "Per-call timeout for writing an operational dynamic config snapshot to the primary database",
6053+
DefaultValue: time.Second * 2,
6054+
},
60076055
}
60086056

60096057
var MapKeys = map[MapKey]DynamicMap{

0 commit comments

Comments
 (0)