-
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
acceptance: test rapid restarts and early queries #19591
Conversation
I didn't review the last commit yet because you said not to.
That's a PR -- which issue did you mean? Reviewed 1 of 1 files at r1, 1 of 1 files at r2, 1 of 1 files at r3. pkg/cli/start.go, line 694 at r3 (raw file):
I might change this from Comments from Reviewable |
Extracted from cockroachdb#19591 which also adds a regression test. The tests in that PR pass, but to make sure I verified manually using ``` while true; do curl -O /dev/null http://localhost:8080/_status/vars; done ``` and `./cockroach start --insecure` in another window, ten times. Fixes cockroachdb#19559.
#19579, updated the message. Review status: 2 of 9 files reviewed at latest revision, 1 unresolved discussion, all commit checks successful. pkg/cli/start.go, line 694 at r3 (raw file): Previously, a-robinson (Alex Robinson) wrote…
Makes sense, renamed to Comments from Reviewable |
Pushed an update, review to your heart's content! The test has already found an additional error, but it'll take some looking into. edit: added a commit that fixes that one, too. |
15a585a
to
5d8c911
Compare
Reviewed 1 of 1 files at r2, 8 of 8 files at r5, 1 of 1 files at r6, 1 of 1 files at r7, 6 of 7 files at r8. pkg/acceptance/rapid_restart_test.go, line 33 at r8 (raw file):
move up pkg/acceptance/rapid_restart_test.go, line 71 at r8 (raw file):
nit: I think this could be cleaned up using the following structure.
pkg/acceptance/rapid_restart_test.go, line 84 at r8 (raw file):
Do you think there's value in having one of these tests for a multi-node cluster? pkg/acceptance/rapid_restart_test.go, line 103 at r8 (raw file):
Isn't this TODO already covered/discussed in pkg/acceptance/rapid_restart_test.go, line 122 at r8 (raw file):
We don't want to do this for fresh nodes? pkg/acceptance/version_upgrade_test.go, line 69 at r8 (raw file):
super nit: verify -> verifying pkg/acceptance/localcluster/cluster.go, line 706 at r8 (raw file):
nit: this should probably have a more general name, like pkg/cli/start.go, line 656 at r7 (raw file):
pkg/cli/start.go, line 698 at r7 (raw file):
Add a comment that checking pkg/cli/start.go, line 754 at r7 (raw file):
did it? Your call if it's worth printing a different message here. Comments from Reviewable |
Reviewed 1 of 1 files at r2, 1 of 1 files at r3, 7 of 7 files at r4, 1 of 1 files at r7, 7 of 7 files at r8. pkg/acceptance/rapid_restart_test.go, line 58 at r8 (raw file):
For this reason it's probably a better idea to rename Comments from Reviewable |
This fixes a panic that would occur if the RocksDB instance was closed with moving parts still trying to use it.
Review status: all files reviewed at latest revision, 12 unresolved discussions, all commit checks successful. pkg/acceptance/rapid_restart_test.go, line 33 at r8 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Done. pkg/acceptance/rapid_restart_test.go, line 58 at r8 (raw file): Previously, bdarnell (Ben Darnell) wrote…
Done. pkg/acceptance/rapid_restart_test.go, line 71 at r8 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Done. pkg/acceptance/rapid_restart_test.go, line 84 at r8 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
It wouldn't hurt, but it's more than I've set out to do here. Also, the acceptance tests tend to not be set up to return early, so it might require some more refactors. pkg/acceptance/rapid_restart_test.go, line 103 at r8 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Yup, forgot to remove this. Done. pkg/acceptance/rapid_restart_test.go, line 122 at r8 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Sure, why not. Added. pkg/acceptance/version_upgrade_test.go, line 69 at r8 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Done. pkg/acceptance/localcluster/cluster.go, line 706 at r8 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Done. pkg/cli/start.go, line 656 at r7 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Done. pkg/cli/start.go, line 698 at r7 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Done. pkg/cli/start.go, line 754 at r7 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Done. Comments from Reviewable |
Reviewed 4 of 7 files at r12, 1 of 1 files at r13. pkg/acceptance/version_upgrade_test.go, line 69 at r8 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Probably don't need a separate commit for this 😛 Comments from Reviewable |
Review status: 6 of 9 files reviewed at latest revision, 3 unresolved discussions, some commit checks pending. pkg/acceptance/version_upgrade_test.go, line 69 at r8 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
You might have a point.. let me see what I can do. Comments from Reviewable |
See cockroachdb#19559, cockroachdb#19579, cockroachdb#19571 for issues touched by this test (all of which it reproduced before the preceding commits fixed them). The changes here (outside of the test) ensure that a single-node instance starts as quickly as possible, without waiting for ports to be ready or for replication to have occurred. This was done to remove any additional delay in `TestRapidRestarts` that could otherwise obscur bugs (for example, consider that going through `./cockroach quit` was not able to tickle any of the bugs). # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. I was also tempted to "bump" the version upgrade tests to use 1.1 instead of 1.0 since that would have removed a bunch of cruft (since 1.0 doesn't write its listener files), but I decided against that. As a result, some of the new accessors look a little unclean, but they should straighten themselves out once we only rely on listener files.
TFTRs! |
See #19559, #19579, #19571 for issues touched by this test (all of which
it reproduced before the preceding commits fixed them).
The changes here (outside of the test) ensure that a single-node instance starts
as quickly as possible, without waiting for ports to be ready or for replication
to have occurred. This was done to remove any additional delay in
TestRapidRestarts
that could otherwise obscur bugs (for example, consider thatgoing through
./cockroach quit
was not able to tickle any of the bugs).I was also tempted to "bump" the version upgrade tests to use 1.1 instead of 1.0
since that would have removed a bunch of cruft (since 1.0 doesn't write its
listener files), but I decided against that. As a result, some of the new
accessors look a little unclean, but they should straighten themselves out once
we only rely on listener files.