-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sort fields when extracting timeseries schema
- Fields are reported in a sample sorted within a target or metric, but not necessarily between them. When we derive a schema from a sample, this commit collects fields into a set to impose a total order. - Convert between a `DbFieldList` and `BTreeSet` when inserting / reading fields from the nested tables in ClickHouse. - Add sanity test that we're sorting field schema correctly, including on read from the database. - Errors for schema mismatches report entire schema, not just fields. - Logic around new schema was pretty complicated, and it was difficult to reason about its correctness. Make the lock async, and check both the internal cache and database when looking for a schema for a new sample. - Add test that we don't add a schema to the DB again when it exists in the DB, but not the internal cache. Instead, we update the cache.
- Loading branch information
Showing
4 changed files
with
264 additions
and
84 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
Oops, something went wrong.