-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workload: move sampledataccl abstraction and add query workloads
The sampledataccl package was started to centralize logic for testdata generation in BACKUP/RESTORE, as well as provide comparable benchmarks between operations running at the sql and kv layers. It has proven useful and is ready to graduate out of ccl. Before sampledataccl, many ccl/... tests rolled their own test data in one of various forms: sql INSERTS, csv, []string, []engine.MVCCKeyValue, ssts, RocksDB batch reprs. Insidiously the kv testdata generation was different from test to test and recreated just enough of our sql key encoding to get that test to pass. The sampledataccl.Bank abstraction was built to provide exactly the same schema in all of these forms, converting between them using actual production code, so nothing rotted. This had the wonderful side benefit of making the throughput measurement of benchmarks at the sql and kv layers comparable, which helped considerably during BACKUP/RESTORE performance tuning work. This problem is not exclusive to ccl; many places in the codebase do this recreation of just enough of our key encoding to get a particular test to pass, which is often subtly incorrect and requires boilerplate that detracts from what the test is doing. This commit moves the abstraction out of ccl so it can start to be used more widely. This opportunity is also taken to add support for more than one table as well as the ability to run query workloads (hence the new workload package name). Upcoming commits will add tooling to run these workloads against clusters (think of the loadgen/kv tool), with significantly less effort than is currently required to add a new loadgen. We'll also be able to have a single tool for making large test fixtures and to keep this tool tested so it doesn't rot. This has traditionally been done ad-hoc and was a huge obstruction in BACKUP/RESTORE production testing. Still TODO is teasing the final ccl deps out of the remaining sampledataccl features. Release note: None
- Loading branch information
Showing
13 changed files
with
622 additions
and
313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.