Fix log state for sidekiq memory killer
What does this MR do and why?
In Sidekiq Memory Killer
, we were calling refresh_state (which refreshes current_rss), before logging the current state.
This leads to logs where we log that Sidekiq RSS was out of the range
but since we logged the refreshed current_rss it can now be actually lower than the soft limit.
This MR fixes this by updating state (update metrics and logs) separately from refreshing the current rss.
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #368691 (closed)
Edited by Nikola Milojevic