-
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
Add disk fullness test #25051
Add disk fullness test #25051
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.
will fix all the formatting issues
Makefile
Outdated
@@ -1321,7 +1321,8 @@ bins := \ | |||
bin/teamcity-trigger \ | |||
bin/urlcheck \ | |||
bin/workload \ | |||
bin/zerosum | |||
bin/zerosum \ |
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.
will change order
d06d037
to
cdba17f
Compare
26ac542
to
61771d8
Compare
543b2b5
to
843c740
Compare
This looks pretty good, thanks for the work so far! I have some orthogonal suggestion on the ballast file creation, would be curious if you're interested in picking that up. Reviewed 6 of 6 files at r3. pkg/cmd/fill_ballast/main.go, line 30 at r3 (raw file):
Prepend "exactly one of" Do you also want to check the case in which neither is supplied and fail here? pkg/cmd/fill_ballast/main.go, line 59 at r3 (raw file):
This is an odd check, why not fail on equality? pkg/cmd/fill_ballast/main.go, line 63 at r3 (raw file):
I discussed the idea of a ballast file with @bdarnell and we'd be interested in embedding this in the cockroach binary itself, under
where
(the code to parse all of these is already used by, I think, the I assume users usually would use something like For the "portable" implementation, I'd just blindly try to use pkg/cmd/roachtest/cluster.go, line 778 at r3 (raw file):
Could you make this a method that takes a cluster instead of putting it on the cluster? pkg/cmd/roachtest/disk_space.go, line 88 at r3 (raw file):
Use something like pkg/cmd/roachtest/disk_space.go, line 91 at r3 (raw file):
nit: pkg/cmd/roachtest/disk_space.go, line 113 at r3 (raw file):
Rename this variable, I got confused for a second. pkg/cmd/roachtest/disk_space.go, line 124 at r3 (raw file):
You could also make this a one-liner with pkg/cmd/roachtest/disk_space.go, line 143 at r3 (raw file):
pkg/cmd/roachtest/disk_space.go, line 239 at r3 (raw file):
The testcases could use some general commentary on what the test exercises. It's not quite clear to me yet (though the commit message does a bit of explanation). Comments from Reviewable |
d5f9f79
to
00e454c
Compare
Review status: 2 of 6 files reviewed at latest revision, 11 unresolved discussions, some commit checks failed. pkg/cmd/fill_ballast/main.go, line 63 at r3 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
It would also be nice to use the Comments from Reviewable |
462e7c3
to
ad7f598
Compare
@tschottdorf, I have updated the diff with incorporating the command in cockroach debug. The UT that failed is just due to a debug print, that I will remove. Can you take a look at the debug command changes? |
c3debda
to
9e3c7c5
Compare
I am getting Comments from Reviewable |
5bea383
to
2ae351f
Compare
@tschottdorf, I have amended on your comments. Please have another look. |
mod the remaining comments, thanks! Reviewed 19 of 21 files at r8, 10 of 19 files at r9, 3 of 7 files at r10, 3 of 5 files at r11. pkg/base/store_spec.go, line 103 at r11 (raw file):
Looks like this should be printed as %f (or the message can be misleading if pkg/cli/cliflags/flags.go, line 547 at r6 (raw file): Previously, kaavee315 (Karan Vaidya) wrote…
👍 Good point. pkg/cmd/roachtest/disk_space.go, line 210 at r11 (raw file):
Here too you're probably getting lucky. When a range is rebalanced away, the disk space is usually reclaimed after at least 2 minutes, if at all. pkg/cmd/roachtest/disk_space.go, line 216 at r11 (raw file):
This also doesn't account for write amplification, which can be substantial. Since you've measured the numbers experimentally I'd leave this for now, but mention it in the comment. pkg/util/sysutil/large_file_non_linux.go, line 31 at r11 (raw file):
Comments from Reviewable |
e99a27c
to
3d684b7
Compare
Add a test to check the behaviour of cockroach cluster when disk is near full. This test currently runs a workload on the cluster. Then it fills the cluster using a ballast file to a given fraction. The test does an insert and delete in loop to check if GC can keep in sync Release note: None
Review status: 2 of 19 files reviewed at latest revision, 6 unresolved discussions. pkg/base/store_spec.go, line 103 at r11 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Done. pkg/cmd/roachtest/disk_space.go, line 210 at r11 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
I think the reason is that the data being generated is lesser than calculcated, and the buffer over here is enough to take this into account. Adding the same into comment below. pkg/cmd/roachtest/disk_space.go, line 216 at r11 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Done. pkg/util/sysutil/large_file_non_linux.go, line 31 at r11 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Done. Comments from Reviewable |
Thanks! Your teamcity build seems weirdly stuck but it has made it past test and testrace, so it's either a teamcity or unrelated code problem. bors r+ Reviewed 18 of 20 files at r12, 19 of 21 files at r13. Comments from Reviewable |
25051: Add disk fullness test r=tschottdorf a=kaavee315 Add a test to check the behaviour of cockroach cluster when disk is near full. This test currently runs a workload on the cluster. Then it fills the cluster using a ballast file to a given fraction. The test does an insert and delete in loop to check if GC can keep in sync Release note (cli change): add the cockroach debug ballast command. It can be used to create ballast file to fill the cockroach store directory Co-authored-by: Karan Vaidya <kaavee315@gmail.com>
Build succeeded |
Add a test to check the behaviour of cockroach cluster when disk is near full.
This test currently runs a workload on the cluster. Then it fills the cluster
using a ballast file to a given fraction. The test does an insert and delete
in loop to check if GC can keep in sync
Release note (cli change): add the cockroach debug ballast command. It can be used to create ballast file to fill the cockroach store directory