-
Notifications
You must be signed in to change notification settings - Fork 805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix throttling burst and add debug logs #529
Conversation
@@ -627,9 +627,10 @@ func (s *matchingEngineSuite) TestConcurrentPublishConsumeActivitiesWithZeroDisp | |||
const taskCount = 100 | |||
s.matchingEngine.metricsClient = metrics.NewClient(tally.NewTestScope("test", nil), metrics.Matching) | |||
throttleCt := s.concurrentPublishConsumeActivities(workerCount, taskCount, dispatchLimitFn) | |||
s.logger.Infof("Number of tasks throttled: %d", throttleCt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What should throttleCt
be? If it only needs to be >= 1, I would just remove this log.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now, I test for anything non-zero since it's hard to determine the exact number. The log line is there more for the flaky test. I don't believe it should be flaky anymore but if it is, it's good to see this in the log.
service/matching/service.go
Outdated
@@ -55,7 +55,7 @@ func NewConfig() *Config { | |||
UpdateAckInterval: 10 * time.Second, | |||
OutstandingTaskAppendsThreshold: 250, | |||
MaxTaskBatchSize: 100, | |||
MinTaskThrottlingBurstSize: 10000, | |||
MinTaskThrottlingBurstSize: 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test change or final value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final value. I did some more research to understand this and having a high burst size would allow a burst of say 10000 requests in an instant which is not what we want. If you're interested, I can explain more offline.
No description provided.