-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
storage: add unsplittable ranges to split queue purgatory #25245
storage: add unsplittable ranges to split queue purgatory #25245
Conversation
6e84425
to
ebd1a8e
Compare
Reviewed 10 of 10 files at r1, 1 of 1 files at r2, 7 of 7 files at r3. pkg/storage/replica_command.go, line 740 at r3 (raw file):
I don't like mixing the pkg/storage/split_queue.go, line 40 at r3 (raw file):
This seems like a long time. I'd make this 1 minute instead. Comments from Reviewable |
This makes the interface easier to use with any time-based channel mechanism, like Tickers and Timers. Release note: None
Fixes cockroachdb#25191. Release note: None
In cockroachdb#14654 we added a mechanism to double the max range size whenever a split attempt found a range that was unsplittable. This prevented a tight loop of split attempts. However, it didn't actually do anything to help us find a split point to reduce the size of the range in the future. This size doubling worked in practice, but it was a blunt instrument that had strange effects (see cockroachdb#24215). This change rips out this range size doubling and replaces it with a split queue purgatory. This purgatory is used to house replicas that are unsplittable, preventing them from getting into a tight loop. Release note: None
ebd1a8e
to
e495467
Compare
Review status: all files reviewed at latest revision, 2 unresolved discussions. pkg/storage/replica_command.go, line 740 at r3 (raw file): Previously, bdarnell (Ben Darnell) wrote…
If we do that then we would need to have a pkg/storage/split_queue.go, line 40 at r3 (raw file): Previously, bdarnell (Ben Darnell) wrote…
Done. Comments from Reviewable |
Reviewed 7 of 7 files at r6. pkg/storage/replica_command.go, line 740 at r3 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Yeah, I guess that would mean exporting all of the purgatory errors to roachpb, which doesn't seem worth it. This is fine, then. Comments from Reviewable |
TFTR! bors r+ |
25245: storage: add unsplittable ranges to split queue purgatory r=nvanbenschoten a=nvanbenschoten Fixes #25191. This makes the fix for #24215 trivial. In #14654 we added a mechanism to double the max range size whenever a split attempt found a range that was unsplittable. This prevented a tight loop of split attempts. However, it didn't actually do anything to help us find a split point to reduce the size of the range in the future. This size doubling worked in practice, but it was a blunt instrument that had strange effects (see #24215). This change rips out this range size doubling and replaces it with a split queue purgatory. This purgatory is used to house replicas that are unsplittable, preventing them from getting into a tight loop. Release note: None Co-authored-by: Nathan VanBenschoten <[email protected]>
Build succeeded |
29440: backport 2.0: storage: improve logging of queue errors r=andreimatei a=andreimatei Backport of one commit from #25245, because seeing these errors in a 2.0 cluster would have really helped me. Fixes #25191. Release note: None Co-authored-by: Nathan VanBenschoten <[email protected]>
Fixes #25191.
This makes the fix for #24215 trivial.
In #14654 we added a mechanism to double the max range size whenever a
split attempt found a range that was unsplittable. This prevented a
tight loop of split attempts. However, it didn't actually do anything to
help us find a split point to reduce the size of the range in the
future. This size doubling worked in practice, but it was a blunt
instrument that had strange effects (see #24215).
This change rips out this range size doubling and replaces it with a
split queue purgatory. This purgatory is used to house replicas that
are unsplittable, preventing them from getting into a tight loop.
Release note: None