-
Notifications
You must be signed in to change notification settings - Fork 467
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
adapter: move introspection relations to mz_introspection
#27830
Conversation
mz_introspeciton
mz_introspection
2c2b743
to
66ca7ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adapter parts lgtm.
); | ||
|
||
if let Some(id) = get_schema_entries(schema).get(&name.item) { | ||
debug!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be a metric instead of a debug that defaults to off? As a metric we'd be able to easily have certainty when we could safely remove this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics are unfortunately not available in this context (CatalogState
). We can add them, but I'd rather to that in a different PR to keep the scope of this one small.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation changes look good to me. Probably a misunderstanding on my part, but I was expecting to be able to use both mz_internal
and mz_catalog_unstable
to resolve relations that weren't migrated to mz_introspection
, but will eventually be migrated off mz_internal
; what is the plan to start falling back to the new schema name?
This PR introduces the translation from |
66ca7ad
to
34f2c58
Compare
This commit moves all per-replica introspection sources, as well as objects depending on them, into the new `mz_introspection` schema. It also adds a test to ensure that `mz_introspection` contains all objects that depend on introspection sources, and doesn't contain any others.
This commit adds a compatibility mechanism that translates uses of relations that have been moved to `mz_cluster_unstable` or `mz_introspection` from `mz_internal` automatically if they are referenced through the old schema. This is to simplify the migration effort.
This commit updates the schema of replica introspection relations from `mz_internal` to `mz_introspection`. As part of this, a new page for the `mz_introspection` system catalog schema is created and added to the list of unstable schemas.
34f2c58
to
5d4bdd3
Compare
TFTRs! |
This PR moves all per-replica introspection relations into their own system schema,
mz_introspection
.The change has two major benefits:
This PR includes a compatibility mechanism that looks up queried relations in
mz_introspection
(andmz_catalog_unstable
) if they are not found inmz_internal
. This is mostly meant to simplify the migration of our own internal clients. External users also benefit from it, but there is no current plan to maintain the compatibility mechanism for a long time.Motivation
Part of https://github.com/MaterializeInc/database-issues/issues/7110
Tips for reviewer
The diff is of course huge, but mostly just replacing the schema names, so I hope it's pretty skimable.
The commits that I think require closest review are commit (3), which introduces the compatibility mechanism, and commit (4), which updates the user documentation.
Checklist
$T ⇔ Proto$T
mapping (possibly in a backwards-incompatible way), then it is tagged with aT-proto
label.mz_internal
schema into a newmz_introspection
schema.