-
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
cmd/workload: add fixtures subcommand #21373
Conversation
Looks pretty fabulous! Left some comments. Reviewed 2 of 2 files at r1, 10 of 10 files at r2. pkg/cmd/workload/fixtures.go, line 63 at r2 (raw file):
pkg/cmd/workload/fixtures.go, line 86 at r2 (raw file):
Error if pkg/testutils/workload/fixture.go, line 86 at r2 (raw file):
It feels that the CockroachDB (cluster) version that created the fixture should be part of the key. This makes a difference, for example for #20554 I really want to be able to import a large fixture that predates my fix for that issue to observe how the stats get updated. pkg/testutils/workload/fixture.go, line 185 at r2 (raw file):
I've been staring at this method and feel that it could really use some commentary. It seems that you're putting a CSV file into GCS and then that Why do you keep the csv file? pkg/testutils/workload/fixture.go, line 189 at r2 (raw file):
You could pkg/testutils/workload/fixture.go, line 196 at r2 (raw file):
What is this pkg/testutils/workload/workload.go, line 69 at r2 (raw file):
Comments from Reviewable |
Review status: all files reviewed at latest revision, 7 unresolved discussions, some commit checks failed. pkg/testutils/workload/fixture.go, line 86 at r2 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Actually I'm not sure about my earlier statement. The stats are recomputed as you restore, and the backup format is intentionally not changing between CockroachDB versions, so that it shouldn't matter. Comments from Reviewable |
Release note: None
0c6a80d
to
b5a18e5
Compare
This commit adds tooling for a central repository of precomputed test fixtures corresponding to different configurations of `workload.Generator`s. To list all available fixtures: workload fixtures list To load a fixture into a CockroachDB cluster: workload fixtures load <generator> <generator flags> [crdb url] To compute and store a fixture (the cluster is used to distribute work): workload fixtures load --into_db=<db> <generator> <generator flags> [crdb url] `workload <generator>` has been moved to `workload run <generator>` so we can have subcommands on `workload`. Still TODO is a better integration with `workload run`, which currently always recreates initial data (and does this via the much slower workload.Setup). There is also lots of opportunity for parallelism in the fixture loading and storing, but I wanted to get the basics working first. Release note: None
b5a18e5
to
7762d23
Compare
Review status: 0 of 10 files reviewed at latest revision, 7 unresolved discussions. pkg/cmd/workload/fixtures.go, line 63 at r2 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Done. pkg/cmd/workload/fixtures.go, line 86 at r2 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
pkg/testutils/workload/fixture.go, line 86 at r2 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
👍 yeah, i'd prefer to keep the cockroach version out of it if possible, since a big part of this plan is that some of the fixtures will be expensive to recompute, so we don't want to do it for every cockroach version pkg/testutils/workload/fixture.go, line 185 at r2 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Oh yeah good point. Done. Leaving csv file cleanup as a TODO pkg/testutils/workload/fixture.go, line 189 at r2 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Done. pkg/testutils/workload/fixture.go, line 196 at r2 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Done. pkg/testutils/workload/workload.go, line 69 at r2 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Done. Comments from Reviewable |
. You're aware of #21490? I think that changes syntax you're using. Reviewed 1 of 2 files at r1, 10 of 10 files at r3, 10 of 10 files at r4. pkg/cmd/workload/fixtures.go, line 86 at r2 (raw file): Previously, danhhz (Daniel Harrison) wrote…
Ah, nice! Carry on. Comments from Reviewable |
Ah, I knew something like that was coming, but hadn't caught up enough on email to see the actual PR. I'll ping it to give a heads up. TFTR! |
This commit adds tooling for a central repository of precomputed test
fixtures corresponding to different configurations of
workload.Generator
s.To list all available fixtures:
To load a fixture into a CockroachDB cluster:
To compute and store a fixture (the cluster is used to distribute work):
workload <generator>
has been moved toworkload run <generator>
sowe can have subcommands on
workload
.Still TODO is a better integration with
workload run
, which currentlyalways recreates initial data (and does this via the much slower
workload.Setup). There is also lots of opportunity for parallelism in
the fixture loading and storing, but I wanted to get the basics working
first.