Skip to content

Conversation

@bnaecker
Copy link
Collaborator

@bnaecker bnaecker commented Jul 5, 2024

  • Adds tables representing the timeseries schema. These currently track the core data about a schema that is fixed across versions; the set of fields, also across all versions; and then the mapping between the schema and their fields in each particular version.
  • Add database models for these
  • Add a build.rs to oximeter which sets up a const fn that returns all schema known at compile-time. Nexus uses this to determine which schema need to be loaded during population time.
  • Add datastore methods for loading all those schema during population, and adds a populator using it.
  • Adds more datatstore methods for fetching, listing, and upserting timeseries schema. There are a number of tests around these, but they are currently unused outside the datastore crate itself (other than the populator). The existing Nexus methods for those operations go through ClickHouse directly now, but they'll eventually be redirected to CockroachDB when the remainder of the switch is completed.
  • Closes Move timeseries schema to CockroachDB #1294

- Adds tables representing the timeseries schema. These currently track
  the core data about a schema that is fixed across versions; the set of
  fields, also across all versions; and then the mapping between the
  schema and their fields in each particular version.
- Add database models for these
- Add a build.rs to `oximeter` which sets up a const fn that returns all
  schema known at compile-time. Nexus uses this to determine which
  schema need to be loaded during population time.
- Add datastore methods for loading all those schema during population,
  and adds a populator using it.
- Adds more datatstore methods for fetching, listing, and upserting
  timeseries schema. There are a number of tests around these, but they
  are currently unused outside the datastore crate itself (other than
  the populator). The existing Nexus methods for those operations go
  through ClickHouse directly now, but they'll eventually be redirected
  to CockroachDB when the remainder of the switch is completed.
- Closes #1294
--
-- Names are derived from the concatenation of the target and metric names,
-- joined with a colon (':').
timeseries_name STRING(128) PRIMARY KEY,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably add these limits into the schema generation mechanisms. Those should check the length of the data loaded from TOML, and fail if they exceed these limits. It would be unfortunate to have a "valid" name or description, which is then truncated in the database.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went ahead and did this in #6009. We should review and merge that first, and then I'll update the limits here with those values once we're happy with them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move timeseries schema to CockroachDB

2 participants