-
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
Mz clusters add introspection columns #27803
Mz clusters add introspection columns #27803
Conversation
6d95778
to
47a8c39
Compare
Some(config.logging.log_logging), | ||
config.logging.interval.map(|d| { | ||
Interval::from_duration(&d) | ||
.expect("planning ensured this convertible back to interval") |
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.
I'm not sure about this, I stole it from the cluster_schedules table...
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.
Yeah, this is fine. We create the Duration
from an Interval
in planning, so converting it back should always succeed.
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.
LGTM, can you also update the docs:
materialize/doc/user/content/sql/system-catalog/mz_catalog.md
Lines 105 to 120 in 72a363f
### `mz_clusters` | |
The `mz_clusters` table contains a row for each cluster in the system. | |
<!-- RELATION_SPEC mz_catalog.mz_clusters --> | |
| Field | Type | Meaning | | |
|----------------------|----------------------|------------------------------------------------------------------------------------------------------------------------------------------| | |
| `id` | [`text`] | Materialize's unique ID for the cluster. | | |
| `name` | [`text`] | The name of the cluster. | | |
| `owner_id` | [`text`] | The role ID of the owner of the cluster. Corresponds to [`mz_roles.id`](/sql/system-catalog/mz_catalog/#mz_roles). | | |
| `privileges` | [`mz_aclitem array`] | The privileges belonging to the cluster. | | |
| `managed` | [`boolean`] | Whether the cluster is a [managed cluster](/sql/create-cluster/) with automatically managed replicas. | | |
| `size` | [`text`] | If the cluster is managed, the desired size of the cluster's replicas. `NULL` for unmanaged clusters. | | |
| `replication_factor` | [`uint4`] | If the cluster is managed, the desired number of replicas of the cluster. `NULL` for unmanaged clusters. | | |
| `disk` | [`boolean`] | **Unstable** If the cluster is managed, `true` if the replicas have the `DISK` option . `NULL` for unmanaged clusters. | | |
| `availability_zones` | [`text list`] | **Unstable** If the cluster is managed, the list of availability zones specified in `AVAILABILITY ZONES`. `NULL` for unmanaged clusters. | |
You'll also need to wait for SQL council approval before merging.
Some(config.logging.log_logging), | ||
config.logging.interval.map(|d| { | ||
Interval::from_duration(&d) | ||
.expect("planning ensured this convertible back to interval") |
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.
Yeah, this is fine. We create the Duration
from an Interval
in planning, so converting it back should always succeed.
47a8c39
to
0efe6e1
Compare
2b36022
to
73e5f1d
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.
One minor tweak on behalf of the SQL council. Thanks for doing this!
| `replication_factor` | [`uint4`] | If the cluster is managed, the desired number of replicas of the cluster. `NULL` for unmanaged clusters. | | ||
| `disk` | [`boolean`] | **Unstable** If the cluster is managed, `true` if the replicas have the `DISK` option . `NULL` for unmanaged clusters. | | ||
| `availability_zones` | [`text list`] | **Unstable** If the cluster is managed, the list of availability zones specified in `AVAILABILITY ZONES`. `NULL` for unmanaged clusters. | | ||
| `introspection_logging` | [`boolean`] | Whether introspection data gather is logged. | |
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.
We should match the public CREATE CLUSTER
wording here (INTROSPECTION DEBUGGING
), rather than the internal wording in the code.
73e5f1d
to
fb27998
Compare
fb27998
to
5098f2f
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.
LGTM from a SQL council perspective. 🎉 Thanks again for knocking this one out!
5098f2f
to
6315b82
Compare
6315b82
to
3a8ad39
Compare
Motivation
We should show these as they may cause replicas to be redeployed on
alter cluster
if changed.Tips for reviewer
Checklist
$T ⇔ Proto$T
mapping (possibly in a backwards-incompatible way), then it is tagged with aT-proto
label.