Skip to content

Commit

Permalink
Default NumTaskqueue*Partitions to 4, use this value when listing par…
Browse files Browse the repository at this point in the history
…titions (#618)
  • Loading branch information
Mark Markaryan committed Jul 28, 2020
1 parent f2bf9b2 commit 463fc8a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
5 changes: 1 addition & 4 deletions config/dynamicconfig/development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
MaximumAttempts: 0
4 changes: 2 additions & 2 deletions service/matching/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion service/matching/matchingEngine.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion service/matching/matchingEngine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 463fc8a

Please sign in to comment.