diff --git a/service/worker/scanner/scanner.go b/service/worker/scanner/scanner.go index 570f5917150..17b83cd9e83 100644 --- a/service/worker/scanner/scanner.go +++ b/service/worker/scanner/scanner.go @@ -49,8 +49,9 @@ const ( type ( // Config defines the configuration for scanner Config struct { - // PersistenceMaxQPS the max rate of calls to persistence - PersistenceMaxQPS dynamicconfig.IntPropertyFn + // ScannerPersistenceMaxQPS the max rate of calls to persistence + // Right now is being used by historyScanner to determine the rate of persistence API calls + ScannerPersistenceMaxQPS dynamicconfig.IntPropertyFn // Persistence contains the persistence configuration Persistence *config.Persistence // ClusterMetadata contains the metadata for this cluster diff --git a/service/worker/scanner/workflow.go b/service/worker/scanner/workflow.go index cbc6dbb2570..63525367a54 100644 --- a/service/worker/scanner/workflow.go +++ b/service/worker/scanner/workflow.go @@ -160,7 +160,7 @@ func HistoryScavengerActivity( ) (history.ScavengerHeartbeatDetails, error) { ctx := activityCtx.Value(scannerContextKey).(scannerContext) - rps := ctx.cfg.PersistenceMaxQPS() + rps := ctx.cfg.ScannerPersistenceMaxQPS() hbd := history.ScavengerHeartbeatDetails{} if activity.HasHeartbeatDetails(activityCtx) { diff --git a/service/worker/service.go b/service/worker/service.go index 1f01e83aa6d..33614c37821 100644 --- a/service/worker/service.go +++ b/service/worker/service.go @@ -127,11 +127,11 @@ func NewConfig(params *service.BootstrapParams) *Config { TimeLimitPerArchivalIteration: dc.GetDurationProperty(dynamicconfig.WorkerTimeLimitPerArchivalIteration, archiver.MaxArchivalIterationTimeout()), }, ScannerCfg: &scanner.Config{ - PersistenceMaxQPS: dc.GetIntProperty(dynamicconfig.ScannerPersistenceMaxQPS, 100), - Persistence: ¶ms.PersistenceConfig, - ClusterMetadata: params.ClusterMetadata, - TaskListScannerEnabled: dc.GetBoolProperty(dynamicconfig.TaskListScannerEnabled, true), - HistoryScannerEnabled: dc.GetBoolProperty(dynamicconfig.HistoryScannerEnabled, true), + ScannerPersistenceMaxQPS: dc.GetIntProperty(dynamicconfig.ScannerPersistenceMaxQPS, 5), + Persistence: ¶ms.PersistenceConfig, + ClusterMetadata: params.ClusterMetadata, + TaskListScannerEnabled: dc.GetBoolProperty(dynamicconfig.TaskListScannerEnabled, true), + HistoryScannerEnabled: dc.GetBoolProperty(dynamicconfig.HistoryScannerEnabled, false), ConcreteExecutionScannerConfig: &executions.ScannerWorkflowDynamicConfig{ Enabled: dc.GetBoolProperty(dynamicconfig.ConcreteExecutionsScannerEnabled, false), Concurrency: dc.GetIntProperty(dynamicconfig.ConcreteExecutionsScannerConcurrency, 25),