-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
release-23.1: server: deflake test hot ranges response #105879
Conversation
Flaky tests for HotRanges api were caused after changing source for getting stats per replica in `mapToHotReplicasInfo` func. `mapToHotReplicasInfo` func calls `Repl().LoadStats()` that internally relies on calculating averages on each function call. Now, `mapToHotReplicasInfo` func relies on `RangeUsageInfo()` func that keeps average stats at the time stats were recorded. In addition, tests validate that QPS should be greater that zero if both write/read keys and write/read bytes stats are non-zero. Release note: None
Thanks for opening a backport. Please check the backport criteria before merging:
If some of the basic criteria cannot be satisfied, ensure that the exceptional criteria are satisfied within.
Add a brief release justification to the body of your PR to justify this backport. Some other things to consider:
|
Thank you for contributing to CockroachDB. Please ensure you have followed the guidelines for creating a PR. My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
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.
Backport 1/1 commits from #99108.
/cc @cockroachdb/release
Flaky tests for HotRanges api were caused after changing source
for getting stats per replica in
mapToHotReplicasInfo
func.mapToHotReplicasInfo
func callsRepl().LoadStats()
thatinternally relies on calculates average values per second
in current moment, but values could be recorded earlier.
Now,
mapToHotReplicasInfo
func relies onRangeUsageInfo()
functhat keeps average stats at the time stats were recorded.
Related change to this fix: #99716
Release note: None
Fixes: #98619
Release justification: non-production code changes