Skip to content

Commit d8cf2c7

Browse files
committed
mz_cluster_replica_history: revert internal_replica_id
This commit reverts de57303, now that the replica ID in mz_cluster_replica_history matches the user-facing replica ID format again.
1 parent 98517bc commit d8cf2c7

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

doc/user/content/sql/system-catalog/mz_internal.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ each replica, including the times at which it was created and dropped
130130
<!-- RELATION_SPEC mz_internal.mz_cluster_replica_history -->
131131
| Field | Type | Meaning |
132132
|-----------------------|------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|
133-
| `internal_replica_id` | [`text`] | An internal identifier of a cluster replica. Guaranteed to be unique, but not guaranteed to correspond to any user-facing replica ID. |
133+
| `replica_id` | [`text`] | The ID of a cluster replica. |
134134
| `size` | [`text`] | The size of the cluster replica. Corresponds to [`mz_cluster_replica_sizes.size`](#mz_cluster_replica_sizes). |
135135
| `cluster_name` | [`text`] | The name of the cluster associated with the replica. |
136136
| `replica_name` | [`text`] | The name of the replica. |

src/adapter/src/catalog/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4410,7 +4410,7 @@ pub const MZ_CLUSTER_REPLICA_HISTORY: BuiltinView = BuiltinView {
44104410
WHERE object_type = 'cluster-replica' AND event_type = 'drop'
44114411
)
44124412
SELECT
4413-
creates.replica_id AS internal_replica_id,
4413+
creates.replica_id,
44144414
creates.size,
44154415
creates.cluster_name,
44164416
creates.replica_name,

test/sqllogictest/audit_log.slt

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ SELECT occurred_at::text = '1970-01-01 00:00:00.666+00' FROM mz_audit_events ORD
179179
false
180180

181181
query TTTTBBBT
182-
SELECT internal_replica_id, cluster_name, replica_name, size, created_at IS NOT NULL, dropped_at IS NOT NULL, created_at < dropped_at, credits_per_hour FROM mz_internal.mz_cluster_replica_history ORDER BY created_at
182+
SELECT replica_id, cluster_name, replica_name, size, created_at IS NOT NULL, dropped_at IS NOT NULL, created_at < dropped_at, credits_per_hour FROM mz_internal.mz_cluster_replica_history ORDER BY created_at
183183
----
184184
u1 default r1 1 true false NULL 1
185185
u2 foo r 1 true true true 1

test/sqllogictest/autogenerated/mz_internal.slt

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ SELECT position, name, type FROM objects WHERE schema = 'mz_internal' AND object
8282
query ITT
8383
SELECT position, name, type FROM objects WHERE schema = 'mz_internal' AND object = 'mz_cluster_replica_history' ORDER BY position
8484
----
85-
1 internal_replica_id text
85+
1 replica_id text
8686
2 size text
8787
3 cluster_name text
8888
4 replica_name text

test/sqllogictest/transform/normalize_lets.slt

+2-2
Original file line numberDiff line numberDiff line change
@@ -558,13 +558,13 @@ from
558558
(select
559559
ref_0."credits_per_hour" as c0,
560560
ref_0."credits_per_hour" as c1,
561-
ref_0."internal_replica_id" as c2,
561+
ref_0."replica_id" as c2,
562562
ref_0."cluster_name" as c3,
563563
(select "id" from mz_internal.mz_scheduling_elapsed_raw limit 1 offset 57)
564564
as c4
565565
from
566566
mz_internal.mz_cluster_replica_history as ref_0
567-
where ref_0."internal_replica_id" is NULL
567+
where ref_0."replica_id" is NULL
568568
limit 102) as subq_0
569569
where (~ (select "replication_factor" from mz_catalog.mz_clusters limit 1 offset 5)
570570
) <= (~ case when (case when (((((select "details" from mz_internal.mz_sink_statuses limit 1 offset 4)

0 commit comments

Comments
 (0)