-
Notifications
You must be signed in to change notification settings - Fork 817
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
Increase poller history LRU cache size #4033
Increase poller history LRU cache size #4033
Conversation
Unrelated to this diff, why do we pass in historyUpdatedFunc? IMO we should just pass in metrics scope and emit it inside the cache. |
@@ -30,7 +30,7 @@ import ( | |||
|
|||
const ( | |||
pollerHistoryInitSize = 0 | |||
pollerHistoryInitMaxSize = 1000 | |||
pollerHistoryInitMaxSize = 5000 |
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.
So this is per tasklist right? 5000 should be a sufficient large value to use.
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.
Yes, this is per tasklist. 5000 should be enough for most cases, if we will see 5000 pollers per tasklist, it might be a good indicator to turn on tasklist sharding
Yes, this sounds reasonable. Unfortunately current LRU cache implementation evicts outdated entries only when iterating over items (i.e. get list of pollers) This can be addressed in a separate PR |
Co-authored-by: Liang Mei <meiliang86@gmail.com>
What changed?
LRU poller cache size is increased from 1000 to 5000
Why?
Task list poller count metric is representing entries in this cache. When there are more than 1000 workers, this metric becomes misleading.
How did you test it?
Unit tests
Potential risks