-
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
storage: filter abort span during split copy #26934
Conversation
e94da24
to
df93e3b
Compare
3ff8e9e
to
a17c7b8
Compare
Reviewed 1 of 3 files at r1. pkg/storage/client_split_test.go, line 102 at r1 (raw file):
Leave a comment about what this is testing. pkg/storage/replica_command.go, line 1148 at r1 (raw file):
Do you think this should all be moved into a pkg/storage/replica_command.go, line 1163 at r1 (raw file):
We should add an pkg/storage/abortspan/abortspan.go, line 110 at r1 (raw file):
Not your change, but why does Comments from Reviewable |
f1a0432
to
8054c91
Compare
TFTR! Review status: pkg/storage/client_split_test.go, line 102 at r1 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Done. pkg/storage/replica_command.go, line 1148 at r1 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
I removed the Copy methods. We're only going to copy in two places, splits and merges. Left a TODO for @benesch in the merge code (removing a copy that apparently had no test coverage) and removed the impl of pkg/storage/replica_command.go, line 1163 at r1 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Done. Comments from Reviewable |
8054c91
to
6f3cc2f
Compare
Review status: pkg/storage/abortspan/abortspan.go, line 110 at r1 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
No that works beautifully, done. Maybe there was an import problem at some distant point in the past? Not sure. Comments from Reviewable |
Review status: pkg/storage/abortspan/abortspan.go, line 110 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Done. Comments from Reviewable |
6f3cc2f
to
f764b78
Compare
We are suspecting that some workloads create a sufficient number of abort span records to cause split commands that are too large to be proposed to Raft, in effect rendering the range permanently unsplittable. This is a problem since the range will at some point start to backpressure writes (and even without that, it's a resource hog). Most of the problematic abort span records would very likely be removed during garbage collection; however, abort span records aren't counted in any quantity that triggers GC. Instead of copying the entirety of the abort span, restrict to the entries that would not be removed by a GC operation. In practice, this means that unless a high number of abort span records are created every hour, very few records will actually be copied, and in return the split command size should be small. See cockroachdb#26830. Release note (bug fix): Avoid a situation in which ranges repeatedly fail to perform a split.
f764b78
to
46d6c47
Compare
bors r=nvanbenschoten |
26934: storage: filter abort span during split copy r=nvanbenschoten a=tschottdorf We are suspecting that some workloads create a sufficient number of abort span records to cause split commands that are too large to be proposed to Raft, in effect rendering the range permanently unsplittable. This is a problem since the range will at some point start to backpressure writes (and even without that, it's a resource hog). Most of the problematic abort span records would very likely be removed during garbage collection; however, abort span records aren't counted in any quantity that triggers GC. Instead of copying the entirety of the abort span, restrict to the entries that would not be removed by a GC operation. In practice, this means that unless a high number of abort span records are created every hour, very few records will actually be copied, and in return the split command size should be small. See #26830. Release note (bug fix): Avoid a situation in which ranges repeatedly fail to perform a split. Co-authored-by: Tobias Schottdorf <[email protected]>
Build succeeded |
26944: backport-2.0: storage: filter abort span during split copy r=bdarnell a=tschottdorf Backport 1/1 commits from #26934. Needed slight adjustments to apply, but nothing in the split logic. /cc @cockroachdb/release --- We are suspecting that some workloads create a sufficient number of abort span records to cause split commands that are too large to be proposed to Raft, in effect rendering the range permanently unsplittable. This is a problem since the range will at some point start to backpressure writes (and even without that, it's a resource hog). Most of the problematic abort span records would very likely be removed during garbage collection; however, abort span records aren't counted in any quantity that triggers GC. Instead of copying the entirety of the abort span, restrict to the entries that would not be removed by a GC operation. In practice, this means that unless a high number of abort span records are created every hour, very few records will actually be copied, and in return the split command size should be small. See #26830. Release note (bug fix): Avoid a situation in which ranges repeatedly fail to perform a split. Co-authored-by: Tobias Schottdorf <[email protected]>
We are suspecting that some workloads create a sufficient number of
abort span records to cause split commands that are too large to be
proposed to Raft, in effect rendering the range permanently
unsplittable. This is a problem since the range will at some point
start to backpressure writes (and even without that, it's a resource
hog). Most of the problematic abort span records would very likely
be removed during garbage collection; however, abort span records
aren't counted in any quantity that triggers GC.
Instead of copying the entirety of the abort span, restrict to the
entries that would not be removed by a GC operation. In practice,
this means that unless a high number of abort span records are
created every hour, very few records will actually be copied, and
in return the split command size should be small.
See #26830.
Release note (bug fix): Avoid a situation in which ranges repeatedly
fail to perform a split.