Skip to content
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

Merged
merged 7 commits into from
Jan 26, 2018
Merged

Fix throttling burst and add debug logs #529

merged 7 commits into from
Jan 26, 2018

Conversation

madhuravi
Copy link
Contributor

No description provided.

@@ -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)
Copy link
Contributor

@vancexu vancexu Jan 26, 2018

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.

Copy link
Contributor Author

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.

@@ -55,7 +55,7 @@ func NewConfig() *Config {
UpdateAckInterval: 10 * time.Second,
OutstandingTaskAppendsThreshold: 250,
MaxTaskBatchSize: 100,
MinTaskThrottlingBurstSize: 10000,
MinTaskThrottlingBurstSize: 1,
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants