-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
kvserver: allow empty ranges to be merged regardless of QPS #71899
Conversation
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.
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @nvanbenschoten)
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.
This seems reasonable once we fix the test.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status:complete! 2 of 0 LGTMs obtained (waiting on @ajwerner)
I noticed while running some ORM tests that empty ranges never got merged away. When I manually range them through the queue, I got the report: ``` skipping merge: LHS QPS measurement not yet reliable ``` All of the ranges in question were totally empty. This small patch seems to fix the problem. Release note (bug fix): Empty ranges sometimes will now be merged away regardless of QPS data.
300c5f7
to
c4f6ed0
Compare
Alright, turning back to this, I'm not sure I understand some of the nuances of the failing tests. Namely, why are we running a cockroach/pkg/kv/kvserver/client_merge_test.go Lines 4357 to 4375 in f11f912
|
Excuse my ignorance, but why do we want to treat empty ranges differently than non-empty ones? Why merge them when we wouldn't have merged them had they not been empty? |
The problem I ran into is that it seemed like ranges which never receive traffic or get unquiesced never get reliable QPS. The motivation for this PR is ORM tests which create and drop 10s of thousands of tables and drop them very rapidly with very short TTLs. None of those ranges which we split off were getting merged away. The reason from the queue was the lack of reliable QPS data. I was looking for a hack to deal with it. |
I guess I'd be curious what this "lack of reliable QPS data" is about. |
Yeah, that's legit. I'll re-run my experiments. Maybe I picked badly. |
Seems related to #68840. |
The lack of reliable qps data is related to #64201. In that PR, we introduced a mandatory 5 minute (by default, see Those issues are mostly unaffected by this change because this PR only applies to completely empty ranges. I think it is possible to have an empty range that performs a load-based split due to heavy read traffic, but that seems unlikely. And furthermore, rebalancing such a range would be very cheap. So this change seems reasonable to me. However, writing this out does make me wonder whether we should change the definition of "empty". We're using Regarding the question of why we use |
Indeed lowering |
I noticed while running some ORM tests that empty ranges never got merged
away. When I manually range them through the queue, I got the report:
All of the ranges in question were totally empty. This small
patch seems to fix the problem.
Release note (bug fix): Empty ranges sometimes will now be merged away
regardless of QPS data.