-
Notifications
You must be signed in to change notification settings - Fork 801
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
Emit metrics when transfer tasks could be ratelimited #5652
Conversation
Pull Request Test Coverage Report for Build 018d8e6b-9771-49d7-b2ee-9f71a53ac1b3
💛 - Coveralls |
@@ -99,6 +103,9 @@ func (t *transferTaskExecutorBase) pushActivity( | |||
t.logger.Fatal("Cannot process non activity task", tag.TaskType(task.GetTaskType())) | |||
} | |||
|
|||
// Ratelimiting is not done. This is only to count the number of requests via metrics | |||
t.wfIDCache.AllowInternal(task.DomainID, task.WorkflowID) |
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.
This function is called by transfer active task executor and transfer standby task executor. Are we going to count those together in same rate limit quota?
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.
Thats a good catch. I have considered to address this in a follow up PR
What changed?
Adding call to workflowID cache based ratelimiter during transfer task execution
Why?
to get metrics on potential hot shards and investigate when requests will be ratelimited
How did you test it?
tested locally and added unit tests
Potential risks
Release notes
Documentation Changes