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

skip action when count doesn't change #108

Merged
merged 1 commit into from
Apr 28, 2020

Conversation

lgfa29
Copy link
Contributor

@lgfa29 lgfa29 commented Apr 28, 2020

This PR prevents the Autoscaler from taking an action when count value doesn't change to avoid unnecessary work.

@lgfa29 lgfa29 requested review from jrasell and cgbaker April 28, 2020 16:33
Copy link
Contributor

@cgbaker cgbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we trust currentCount, right?

@lgfa29
Copy link
Contributor Author

lgfa29 commented Apr 28, 2020

we trust currentCount, right?

currentCount is the values used to calculate the next count, so if it go stale the next count would be wrong as well.

We could re-check if it's still valid, but there's no guarantee it will always be right without some kind of global lock.

If currentCount does get stale, the Autoscaler will notice this in the next evaluation cycle and correct it, so I think it's fine to trust it at this point.

@lgfa29 lgfa29 merged commit 5a61d67 into master Apr 28, 2020
@lgfa29 lgfa29 deleted the f-skip-action-when-count-doesnt-change branch April 28, 2020 18:36
jrasell added a commit that referenced this pull request Apr 29, 2020
jrasell added a commit that referenced this pull request Apr 29, 2020
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