diff --git a/config/dynamicconfig/development.yaml b/config/dynamicconfig/development.yaml index caa0f05de53..75925bc2e5d 100644 --- a/config/dynamicconfig/development.yaml +++ b/config/dynamicconfig/development.yaml @@ -22,12 +22,9 @@ history.historyMgrNumConns: system.advancedVisibilityWritingMode: - value: "off" constraints: {} -matching.numTaskqueueReadPartitions: -- value: 1 - constraints: {} history.defaultActivityRetryPolicy: - value: InitialRetryIntervalInSeconds: 1 MaximumRetryIntervalInSeconds: 120 ExponentialBackoffCoefficient: 2.0 - MaximumAttempts: 0 \ No newline at end of file + MaximumAttempts: 0 diff --git a/service/matching/config.go b/service/matching/config.go index d0dd28433a3..65ec0705dd3 100644 --- a/service/matching/config.go +++ b/service/matching/config.go @@ -111,8 +111,8 @@ func NewConfig(dc *dynamicconfig.Collection) *Config { OutstandingTaskAppendsThreshold: dc.GetIntPropertyFilteredByTaskQueueInfo(dynamicconfig.MatchingOutstandingTaskAppendsThreshold, 250), MaxTaskBatchSize: dc.GetIntPropertyFilteredByTaskQueueInfo(dynamicconfig.MatchingMaxTaskBatchSize, 100), ThrottledLogRPS: dc.GetIntProperty(dynamicconfig.MatchingThrottledLogRPS, 20), - NumTaskqueueWritePartitions: dc.GetIntPropertyFilteredByTaskQueueInfo(dynamicconfig.MatchingNumTaskqueueWritePartitions, 1), - NumTaskqueueReadPartitions: dc.GetIntPropertyFilteredByTaskQueueInfo(dynamicconfig.MatchingNumTaskqueueReadPartitions, 1), + NumTaskqueueWritePartitions: dc.GetIntPropertyFilteredByTaskQueueInfo(dynamicconfig.MatchingNumTaskqueueWritePartitions, 4), + NumTaskqueueReadPartitions: dc.GetIntPropertyFilteredByTaskQueueInfo(dynamicconfig.MatchingNumTaskqueueReadPartitions, 4), ForwarderMaxOutstandingPolls: dc.GetIntPropertyFilteredByTaskQueueInfo(dynamicconfig.MatchingForwarderMaxOutstandingPolls, 1), ForwarderMaxOutstandingTasks: dc.GetIntPropertyFilteredByTaskQueueInfo(dynamicconfig.MatchingForwarderMaxOutstandingTasks, 1), ForwarderMaxRatePerSecond: dc.GetIntPropertyFilteredByTaskQueueInfo(dynamicconfig.MatchingForwarderMaxRatePerSecond, 10), diff --git a/service/matching/matchingEngine.go b/service/matching/matchingEngine.go index 26b8dc4c3d4..b84317bb02f 100644 --- a/service/matching/matchingEngine.go +++ b/service/matching/matchingEngine.go @@ -661,7 +661,7 @@ func (e *matchingEngineImpl) getAllPartitions( partitionKeys = append(partitionKeys, rootPartition) - nWritePartitions := e.config.GetTasksBatchSize + nWritePartitions := e.config.NumTaskqueueWritePartitions n := nWritePartitions(namespace, rootPartition, taskQueueType) if n <= 0 { return partitionKeys, nil diff --git a/service/matching/matchingEngine_test.go b/service/matching/matchingEngine_test.go index 95f2fd484aa..835ebd7b0a5 100644 --- a/service/matching/matchingEngine_test.go +++ b/service/matching/matchingEngine_test.go @@ -786,7 +786,8 @@ func (s *matchingEngineSuite) TestSyncMatchActivities() { s.NotEmpty(descResp.Pollers[0].GetLastAccessTime()) s.Equal(_defaultTaskDispatchRPS, descResp.Pollers[0].GetRatePerSecond()) s.NotNil(descResp.GetTaskQueueStatus()) - s.True(descResp.GetTaskQueueStatus().GetRatePerSecond() >= (_defaultTaskDispatchRPS - 1)) + numPartitions := float64(s.matchingEngine.config.NumTaskqueueWritePartitions("", "", tlType)) + s.True(descResp.GetTaskQueueStatus().GetRatePerSecond()*numPartitions >= (_defaultTaskDispatchRPS - 1)) } func (s *matchingEngineSuite) TestConcurrentPublishConsumeActivities() {