-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework chbench snapshot generation (#5330)
This PR introduces a number of changes around how we generate snapshots from chbench, for use with the ingest tests. First, our snapshot generation code was never 100% complete, as it never wrote out the source_offsets (I had created it by hand and it was part of the S3 archive). Snapshot_view_states now captures the offsets for each source. Second, offsets.json hardcoded the view_name to topic name. Instead of duplicating this information, add code to Peeker to archive the configuration used to generate the snapshot. Included in this configuration file are the sources that comprise each view (currently expected to be a 1 to 1 mapping for our ingest benchmarks). Third, the TOML config file for Peeker is interpreted by Peeker (it substitutes environment variables) and cannot be directly loaded by other programming languages. To fix this, I added a method to Peeker to write out the computed version of the configuration (and loaded it into TOML to validate the config). Fourth, the TOML config file for Peeker could not be serialized due to sleep_ms being a Duration field and not being the last field in the struct. I moved this field to the end of each struct where mentioned, but this created a second problem. Our deserializer converted a single string into a Duration object, which is serialized as a table, thereby breaking symmetry in serialize / deserialize. I removed the custom deserialization so that we can load the serialized file using the same deserialization logic. I think we can write a SQL query / some recursive logic to programmatically get the source names for each view, but this current PR works for saving snapshots and archiving the Peeker config file.
- Loading branch information
Showing
7 changed files
with
222 additions
and
75 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
psycopg2-binary==2.8.6 | ||
toml==0.10.2 |
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.