Fill in the LastUpdateTime Field of VpaCheckpoint Status with Correct Time. #4250
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the "LastUpdateTime" field of the Status of VpaCheckpoint is not set, which is always "NULL" now.
Actually, we found that this filed is very helpful for us to judge whether the vpa Recommender component is working efficiently.
The logic is as below:
(1) If the Recommender component can completely update all vpas in one "RunOnce" cycle, the vpacheckpoints will also be updated in time. In other words, if there are so many vpas to update in one operating cycle (or the "metricsFetcherInterval" is set too short), which cause context timeout, then the update of vpacheckpoints may be delayed for a long time.
(2) If there is no change of any filed of vpa (target, lowerbound and etc), the vpa itself will not be updated. So we can not rely on the update of vpa to detect if the Recommender process vpas and vpacheckpoints efficiently.
(3) In our production environment, the situation described in (1) happened very often, we want to detect this situation and make adjustment accordingly as soon as possible.
And finally we found that the "LastUpdateTime" field of VpaCheckpoint Status can help solve such problem, which is not set yet Now.
We fill in this filed by ourself and use it for a while, and is not particularly convenient when we want to upgrade the code base. So we decide to make this pull request to merge this tiny but very helpful change.
Thank you very much.