Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
103930: schemachanger: prettier EXPLAIN (DDL) output r=postamar a=postamar

This commit adds ID -> name mappings to the scpb.TargetState which lies at the heart of the declarative schema changer, these mappings are then used (when present) to decorate the output of EXPLAIN (DDL) in an effort to make it more understandable.

This commit also adds support for the SHAPE flag in conjunction with EXPLAIN (DDL). The generated output informs on expensive operations such as backfills or validations.

Fixes #104043.

Release note (sql change): EXPLAIN (DDL) statements now have descriptor, index, column, constraint and other ID values decorated with names when available. There is now also a new EXPLAIN (DDL, SHAPE) statement which provides information on costly operations planned by the declarative schema changer, like which index backfills and validations will get performed.

103947: ui: add link to enqueue range from range status r=maryliag a=maryliag

Fixes #79315

A common flow during debug was to open the range
status page to a specific node, then navigating
to the enqueue range page and filling the same node id. This commit makes it possible to jump to the second page with the field for range id already selected.
This commit also updates the styles used on the
Enqueue Range pages to match other styles in other pages.

https://www.loom.com/share/9c2b3547fdfb4daaba3d8f9cda7e035e

Release note (ui change): New link added on Range Status page that opens the Enqueue Ranges page with the node id already filled in.

Co-authored-by: Marius Posta <marius@cockroachlabs.com>
Co-authored-by: maryliag <marylia@cockroachlabs.com>
  • Loading branch information
3 people committed May 30, 2023
3 parents e3862a9 + 6024f4b + 0c5a31c commit 9fc6199
Show file tree
Hide file tree
Showing 577 changed files with 21,761 additions and 19,234 deletions.
28 changes: 28 additions & 0 deletions pkg/ccl/schemachangerccl/testdata/end_to_end/create_index
Expand Up @@ -157,6 +157,20 @@ upsert descriptor #104
+ userName: root
+ currentStatuses: <redacted>
+ jobId: "1"
+ nameMapping:
+ columns:
+ "1": id
+ "2": name
+ "3": money
+ "4294967294": tableoid
+ "4294967295": crdb_internal_mvcc_timestamp
+ families:
+ "0": primary
+ id: 104
+ indexes:
+ "1": t1_pkey
+ "2": id1
+ name: t1
+ relevantStatements:
+ - statement:
+ redactedStatement: CREATE INDEX ‹id1› ON ‹defaultdb›.‹public›.‹t1› (‹id›,
Expand Down Expand Up @@ -457,6 +471,20 @@ upsert descriptor #104
- userName: root
- currentStatuses: <redacted>
- jobId: "1"
- nameMapping:
- columns:
- "1": id
- "2": name
- "3": money
- "4294967294": tableoid
- "4294967295": crdb_internal_mvcc_timestamp
- families:
- "0": primary
- id: 104
- indexes:
- "1": t1_pkey
- "2": id1
- name: t1
- relevantStatements:
- - statement:
- redactedStatement: CREATE INDEX ‹id1› ON ‹defaultdb›.‹public›.‹t1› (‹id›,
Expand Down
Expand Up @@ -99,6 +99,9 @@ upsert descriptor #104
+ userName: root
+ currentStatuses: <redacted>
+ jobId: "1"
+ nameMapping:
+ id: 104
+ name: multi_region_test_db
+ relevantStatements:
+ - statement:
+ redactedStatement: DROP DATABASE ‹multi_region_test_db› CASCADE
Expand All @@ -124,6 +127,9 @@ upsert descriptor #105
+ userName: root
+ currentStatuses: <redacted>
+ jobId: "1"
+ nameMapping:
+ id: 105
+ name: public
+ relevantStatements:
+ - statement:
+ redactedStatement: DROP DATABASE ‹multi_region_test_db› CASCADE
Expand All @@ -147,6 +153,9 @@ upsert descriptor #106
+ userName: root
+ currentStatuses: <redacted>
+ jobId: "1"
+ nameMapping:
+ id: 106
+ name: crdb_internal_region
+ relevantStatements:
+ - statement:
+ redactedStatement: DROP DATABASE ‹multi_region_test_db› CASCADE
Expand All @@ -171,6 +180,9 @@ upsert descriptor #107
+ userName: root
+ currentStatuses: <redacted>
+ jobId: "1"
+ nameMapping:
+ id: 107
+ name: _crdb_internal_region
+ relevantStatements:
+ - statement:
+ redactedStatement: DROP DATABASE ‹multi_region_test_db› CASCADE
Expand All @@ -195,6 +207,9 @@ upsert descriptor #108
+ userName: root
+ currentStatuses: <redacted>
+ jobId: "1"
+ nameMapping:
+ id: 108
+ name: table_regional_by_table
+ relevantStatements:
+ - statement:
+ redactedStatement: DROP DATABASE ‹multi_region_test_db› CASCADE
Expand Down Expand Up @@ -233,6 +248,9 @@ upsert descriptor #108
- userName: root
- currentStatuses: <redacted>
- jobId: "1"
- nameMapping:
- id: 108
- name: table_regional_by_table
- relevantStatements:
- - statement:
- redactedStatement: DROP DATABASE ‹multi_region_test_db› CASCADE
Expand Down
Expand Up @@ -74,6 +74,7 @@ upsert descriptor #106
+ authorization:
+ userName: root
+ jobId: "1"
+ nameMapping: {}
enumMembers:
- logicalRepresentation: us-east1
...
Expand All @@ -94,6 +95,7 @@ upsert descriptor #107
+ authorization:
+ userName: root
+ jobId: "1"
+ nameMapping: {}
id: 107
kind: ALIAS
...
Expand All @@ -112,6 +114,9 @@ upsert descriptor #108
+ userName: root
+ currentStatuses: <redacted>
+ jobId: "1"
+ nameMapping:
+ id: 108
+ name: table_regional_by_row
+ relevantStatements:
+ - statement:
+ redactedStatement: DROP TABLE ‹multi_region_test_db›.‹public›.‹table_regional_by_row›
Expand Down Expand Up @@ -147,6 +152,7 @@ upsert descriptor #106
- authorization:
- userName: root
- jobId: "1"
- nameMapping: {}
enumMembers:
- logicalRepresentation: us-east1
...
Expand All @@ -162,6 +168,7 @@ upsert descriptor #107
- authorization:
- userName: root
- jobId: "1"
- nameMapping: {}
id: 107
kind: ALIAS
...
Expand All @@ -178,6 +185,9 @@ upsert descriptor #108
- userName: root
- currentStatuses: <redacted>
- jobId: "1"
- nameMapping:
- id: 108
- name: table_regional_by_row
- relevantStatements:
- - statement:
- redactedStatement: DROP TABLE ‹multi_region_test_db›.‹public›.‹table_regional_by_row›
Expand Down
Expand Up @@ -67,6 +67,7 @@ upsert descriptor #106
+ authorization:
+ userName: root
+ jobId: "1"
+ nameMapping: {}
enumMembers:
- logicalRepresentation: us-east1
...
Expand All @@ -88,6 +89,9 @@ upsert descriptor #108
+ userName: root
+ currentStatuses: <redacted>
+ jobId: "1"
+ nameMapping:
+ id: 108
+ name: table_regional_by_table
+ relevantStatements:
+ - statement:
+ redactedStatement: DROP TABLE ‹multi_region_test_db›.‹public›.‹table_regional_by_table›
Expand Down Expand Up @@ -125,6 +129,7 @@ upsert descriptor #106
- authorization:
- userName: root
- jobId: "1"
- nameMapping: {}
enumMembers:
- logicalRepresentation: us-east1
...
Expand All @@ -141,6 +146,9 @@ upsert descriptor #108
- userName: root
- currentStatuses: <redacted>
- jobId: "1"
- nameMapping:
- id: 108
- name: table_regional_by_table
- relevantStatements:
- - statement:
- redactedStatement: DROP TABLE ‹multi_region_test_db›.‹public›.‹table_regional_by_table›
Expand Down

0 comments on commit 9fc6199

Please sign in to comment.