Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
95552: gossip: Remove creation time dependency on grpc r=rharding6373,erikgrinaker a=andrewbaptist

    Create gossip objects without a grpc depencency. The rpcContext is
    injected during Start instead. This removes some code tangles and
    simplifies the usage of gossip in tests.

    Epic: none
    Release note: None

95591: docgen: update SQL diagrams for SQL docs refactor r=rytaft a=taroface

Updated existing & added some new SQL diagrams. These will be used in the SQL docs being refactored as per https://cockroachlabs.atlassian.net/browse/DOC-5850

Release note: none

95629: streamingest,bulk,roachpb: add a metric for bytes streamed, compressed r=lidorcarmel a=lidorcarmel

We currently have a mteric for the logical bytes written to SSTs, pre-compression, and this PR adds a metric for the "physical" bytes sent to KV in SSTs, post compression.

Epic: CRDB-18752

Fixes: #92959

Release note: None

For example:
<img width="1012" alt="Screenshot 2023-01-20 at 2 15 31 PM" src="https://user-images.githubusercontent.com/51982110/213814907-13ebdde1-82c4-4597-b9f9-d02a8bc1a112.png">


Co-authored-by: Andrew Baptist <[email protected]>
Co-authored-by: Ryan Kuo <[email protected]>
Co-authored-by: Lidor Carmel <[email protected]>
  • Loading branch information
4 people committed Jan 23, 2023
4 parents c08b21e + 8fe6e82 + bd7c9b9 + d794429 commit 1a4bcbf
Show file tree
Hide file tree
Showing 43 changed files with 379 additions and 247 deletions.
6 changes: 6 additions & 0 deletions docs/generated/sql/bnf/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ FILES = [
"alter_backup",
"alter_backup_schedule",
"alter_column",
"alter_database",
"alter_database_add_region_stmt",
"alter_database_add_super_region",
"alter_database_set_secondary_region_stmt",
Expand All @@ -16,8 +17,10 @@ FILES = [
"alter_database_drop_region",
"alter_database_drop_secondary_region",
"alter_database_owner",
"alter_database_placement_stmt",
"alter_database_primary_region",
"alter_database_set_zone_config_extension_stmt",
"alter_database_set_stmt",
"alter_database_stmt",
"alter_database_survival_goal_stmt",
"alter_database_to_schema_stmt",
Expand All @@ -30,11 +33,13 @@ FILES = [
"alter_func_set_schema_stmt",
"alter_func_dep_extension_stmt",
"alter_index_partition_by",
"alter_index",
"alter_index_stmt",
"alter_index_visible_stmt",
"alter_partition_stmt",
"alter_primary_key",
"alter_range_relocate_stmt",
"alter_range",
"alter_range_stmt",
"alter_rename_view_stmt",
"alter_role_stmt",
Expand All @@ -47,6 +52,7 @@ FILES = [
"alter_sequence_set_schema_stmt",
"alter_stmt",
"alter_table",
"alter_table_cmds",
"alter_table_locality_stmt",
"alter_table_owner_stmt",
"alter_table_partition_by",
Expand Down
41 changes: 41 additions & 0 deletions docs/generated/sql/bnf/alter_database.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
alter_database_stmt ::=
'ALTER' 'DATABASE' database_name 'RENAME' 'TO' database_new_name
| 'ALTER' 'DATABASE' database_name 'CONFIGURE' 'ZONE' 'USING' variable '=' 'COPY' 'FROM' 'PARENT' ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'DATABASE' database_name 'CONFIGURE' 'ZONE' 'USING' variable '=' value ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'DATABASE' database_name 'CONFIGURE' 'ZONE' 'DISCARD'
| 'ALTER' 'DATABASE' database_name 'OWNER' 'TO' role_spec
| 'ALTER' 'DATABASE' database_name 'CONVERT' 'TO' 'SCHEMA' 'WITH' 'PARENT' database_name
| 'ALTER' 'DATABASE' database_name 'ADD' 'REGION' region_name
| 'ALTER' 'DATABASE' database_name 'ADD' 'REGION' 'IF' 'NOT' 'EXISTS' region_name
| 'ALTER' 'DATABASE' database_name 'DROP' 'REGION' region_name
| 'ALTER' 'DATABASE' database_name 'DROP' 'REGION' 'IF' 'EXISTS' region_name
| 'ALTER' 'DATABASE' database_name 'SURVIVE' '=' 'REGION' 'FAILURE'
| 'ALTER' 'DATABASE' database_name 'SURVIVE' 'REGION' 'FAILURE'
| 'ALTER' 'DATABASE' database_name 'SURVIVE' '=' 'ZONE' 'FAILURE'
| 'ALTER' 'DATABASE' database_name 'SURVIVE' 'ZONE' 'FAILURE'
| 'ALTER' 'DATABASE' database_name 'PRIMARY' 'REGION' '=' region_name
| 'ALTER' 'DATABASE' database_name 'PRIMARY' 'REGION' region_name
| 'ALTER' 'DATABASE' database_name 'SET' 'PRIMARY' 'REGION' '=' region_name
| 'ALTER' 'DATABASE' database_name 'SET' 'PRIMARY' 'REGION' region_name
| 'ALTER' 'DATABASE' database_name 'PLACEMENT' 'RESTRICTED'
| 'ALTER' 'DATABASE' database_name 'PLACEMENT' 'DEFAULT'
| 'ALTER' 'DATABASE' database_name 'SET' variable '=' value ( ( ',' value ) )*
| 'ALTER' 'DATABASE' database_name 'SET' variable 'TO' value ( ( ',' value ) )*
| 'ALTER' 'DATABASE' database_name 'RESET_ALL' 'ALL'
| 'ALTER' 'DATABASE' database_name 'RESET' session_var
| 'ALTER' 'DATABASE' database_name 'ADD' 'SUPER' 'REGION' region_name 'VALUES' region_name_list
| 'ALTER' 'DATABASE' database_name 'ALTER' 'SUPER' 'REGION' region_name 'VALUES' region_name_list
| 'ALTER' 'DATABASE' database_name 'DROP' 'SUPER' 'REGION' region_name
| 'ALTER' 'DATABASE' database_name 'SET' 'SECONDARY' 'REGION' '=' region_name
| 'ALTER' 'DATABASE' database_name 'SET' 'SECONDARY' 'REGION' region_name
| 'ALTER' 'DATABASE' database_name 'DROP' 'SECONDARY' 'REGION'
| 'ALTER' 'DATABASE' database_name 'DROP' 'SECONDARY' 'REGION' 'IF' 'EXISTS'
| 'ALTER' 'DATABASE' database_name 'ALTER' 'LOCALITY' 'GLOBAL' 'CONFIGURE' 'ZONE' 'USING' variable '=' 'COPY' 'FROM' 'PARENT' ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'DATABASE' database_name 'ALTER' 'LOCALITY' 'GLOBAL' 'CONFIGURE' 'ZONE' 'USING' variable '=' value ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'DATABASE' database_name 'ALTER' 'LOCALITY' 'GLOBAL' 'CONFIGURE' 'ZONE' 'DISCARD'
| 'ALTER' 'DATABASE' database_name 'ALTER' 'LOCALITY' 'REGIONAL' 'CONFIGURE' 'ZONE' 'USING' variable '=' 'COPY' 'FROM' 'PARENT' ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'DATABASE' database_name 'ALTER' 'LOCALITY' 'REGIONAL' 'CONFIGURE' 'ZONE' 'USING' variable '=' value ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'DATABASE' database_name 'ALTER' 'LOCALITY' 'REGIONAL' 'CONFIGURE' 'ZONE' 'DISCARD'
| 'ALTER' 'DATABASE' database_name 'ALTER' 'LOCALITY' 'REGIONAL' 'IN' region_name 'CONFIGURE' 'ZONE' 'USING' variable '=' 'COPY' 'FROM' 'PARENT' ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'DATABASE' database_name 'ALTER' 'LOCALITY' 'REGIONAL' 'IN' region_name 'CONFIGURE' 'ZONE' 'USING' variable '=' value ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'DATABASE' database_name 'ALTER' 'LOCALITY' 'REGIONAL' 'IN' region_name 'CONFIGURE' 'ZONE' 'DISCARD'
2 changes: 2 additions & 0 deletions docs/generated/sql/bnf/alter_database_placement_stmt.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter_database_placement_stmt ::=
'ALTER' 'DATABASE' database_name placement_clause
2 changes: 2 additions & 0 deletions docs/generated/sql/bnf/alter_database_set_stmt.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter_database_set_stmt ::=
'ALTER' 'DATABASE' database_name set_or_reset_clause
2 changes: 2 additions & 0 deletions docs/generated/sql/bnf/alter_database_stmt.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ alter_database_stmt ::=
| alter_database_drop_region_stmt
| alter_database_survival_goal_stmt
| alter_database_primary_region_stmt
| alter_database_placement_stmt
| alter_database_set_stmt
| alter_database_add_super_region
| alter_database_alter_super_region
| alter_database_drop_super_region
Expand Down
2 changes: 1 addition & 1 deletion docs/generated/sql/bnf/alter_func_stmt.bnf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
alter_func_stmt ::=
( 'ALTER' 'FUNCTION' function_with_paramtypes ( ( ( 'CALLED' 'ON' 'NULL' 'INPUT' | 'RETURNS' 'NULL' 'ON' 'NULL' 'INPUT' | 'STRICT' | 'IMMUTABLE' | 'STABLE' | 'VOLATILE' | 'LEAKPROOF' | 'NOT' 'LEAKPROOF' ) ) ( ( ( 'CALLED' 'ON' 'NULL' 'INPUT' | 'RETURNS' 'NULL' 'ON' 'NULL' 'INPUT' | 'STRICT' | 'IMMUTABLE' | 'STABLE' | 'VOLATILE' | 'LEAKPROOF' | 'NOT' 'LEAKPROOF' ) ) )* ) ( 'RESTRICT' | ) )
| ( 'ALTER' 'FUNCTION' function_with_paramtypes 'RENAME' 'TO' name )
| ( 'ALTER' 'FUNCTION' function_with_paramtypes 'RENAME' 'TO' function_new_name )
| ( 'ALTER' 'FUNCTION' function_with_paramtypes 'OWNER' 'TO' role_spec )
| ( 'ALTER' 'FUNCTION' function_with_paramtypes 'SET' 'SCHEMA' schema_name )
| ( 'ALTER' 'FUNCTION' function_with_paramtypes ( 'NO' | ) 'DEPENDS' 'ON' 'EXTENSION' name )
43 changes: 43 additions & 0 deletions docs/generated/sql/bnf/alter_index.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
alter_index_stmt ::=
'ALTER' 'INDEX' table_name '@' index_name 'PARTITION' 'BY' 'LIST' '(' name_list ')' '(' list_partitions ')' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' table_name '@' index_name 'PARTITION' 'BY' 'RANGE' '(' name_list ')' '(' range_partitions ')' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' table_name '@' index_name 'PARTITION' 'BY' 'NOTHING' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' index_name 'PARTITION' 'BY' 'LIST' '(' name_list ')' '(' list_partitions ')' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' index_name 'PARTITION' 'BY' 'RANGE' '(' name_list ')' '(' range_partitions ')' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' index_name 'PARTITION' 'BY' 'NOTHING' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' 'IF' 'EXISTS' table_name '@' index_name 'PARTITION' 'BY' 'LIST' '(' name_list ')' '(' list_partitions ')' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' 'IF' 'EXISTS' table_name '@' index_name 'PARTITION' 'BY' 'RANGE' '(' name_list ')' '(' range_partitions ')' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' 'IF' 'EXISTS' table_name '@' index_name 'PARTITION' 'BY' 'NOTHING' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' 'IF' 'EXISTS' index_name 'PARTITION' 'BY' 'LIST' '(' name_list ')' '(' list_partitions ')' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' 'IF' 'EXISTS' index_name 'PARTITION' 'BY' 'RANGE' '(' name_list ')' '(' range_partitions ')' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' 'IF' 'EXISTS' index_name 'PARTITION' 'BY' 'NOTHING' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' table_name '@' index_name 'SPLIT' 'AT' select_stmt
| 'ALTER' 'INDEX' index_name 'SPLIT' 'AT' select_stmt
| 'ALTER' 'INDEX' table_name '@' index_name 'SPLIT' 'AT' select_stmt 'WITH' 'EXPIRATION' a_expr
| 'ALTER' 'INDEX' index_name 'SPLIT' 'AT' select_stmt 'WITH' 'EXPIRATION' a_expr
| 'ALTER' 'INDEX' table_name '@' index_name 'UNSPLIT' 'AT' select_stmt
| 'ALTER' 'INDEX' index_name 'UNSPLIT' 'AT' select_stmt
| 'ALTER' 'INDEX' table_name '@' index_name 'UNSPLIT' 'ALL'
| 'ALTER' 'INDEX' index_name 'UNSPLIT' 'ALL'
| 'ALTER' 'INDEX' table_name '@' index_name 'RENAME' 'TO' index_new_name
| 'ALTER' 'INDEX' index_name 'RENAME' 'TO' index_new_name
| 'ALTER' 'INDEX' 'IF' 'EXISTS' table_name '@' index_name 'RENAME' 'TO' index_new_name
| 'ALTER' 'INDEX' 'IF' 'EXISTS' index_name 'RENAME' 'TO' index_new_name
| 'ALTER' 'INDEX' table_name '@' index_name 'CONFIGURE' 'ZONE' 'USING' variable '=' 'COPY' 'FROM' 'PARENT' ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'INDEX' table_name '@' index_name 'CONFIGURE' 'ZONE' 'USING' variable '=' value ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'INDEX' table_name '@' index_name 'CONFIGURE' 'ZONE' 'DISCARD'
| 'ALTER' 'INDEX' index_name 'CONFIGURE' 'ZONE' 'USING' variable '=' 'COPY' 'FROM' 'PARENT' ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'INDEX' index_name 'CONFIGURE' 'ZONE' 'USING' variable '=' value ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'INDEX' index_name 'CONFIGURE' 'ZONE' 'DISCARD'
| 'ALTER' 'INDEX' table_name '@' index_name 'NOT' 'VISIBLE'
| 'ALTER' 'INDEX' table_name '@' index_name 'INVISIBLE'
| 'ALTER' 'INDEX' table_name '@' index_name 'VISIBLE'
| 'ALTER' 'INDEX' index_name 'NOT' 'VISIBLE'
| 'ALTER' 'INDEX' index_name 'INVISIBLE'
| 'ALTER' 'INDEX' index_name 'VISIBLE'
| 'ALTER' 'INDEX' 'IF' 'EXISTS' table_name '@' index_name 'NOT' 'VISIBLE'
| 'ALTER' 'INDEX' 'IF' 'EXISTS' table_name '@' index_name 'INVISIBLE'
| 'ALTER' 'INDEX' 'IF' 'EXISTS' table_name '@' index_name 'VISIBLE'
| 'ALTER' 'INDEX' 'IF' 'EXISTS' index_name 'NOT' 'VISIBLE'
| 'ALTER' 'INDEX' 'IF' 'EXISTS' index_name 'INVISIBLE'
| 'ALTER' 'INDEX' 'IF' 'EXISTS' index_name 'VISIBLE'
12 changes: 12 additions & 0 deletions docs/generated/sql/bnf/alter_range.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
alter_range_stmt ::=
'ALTER' 'RANGE' range_id 'CONFIGURE' 'ZONE' 'USING' var_name '=' 'COPY' 'FROM' 'PARENT' ( ( ',' var_name '=' var_value | ',' var_name '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'RANGE' range_id 'CONFIGURE' 'ZONE' 'USING' var_name '=' var_value ( ( ',' var_name '=' var_value | ',' var_name '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'RANGE' range_id 'CONFIGURE' 'ZONE' 'DISCARD'
| 'ALTER' 'RANGE' 'RELOCATE' 'LEASE' 'TO' a_expr 'FOR' select_stmt
| 'ALTER' 'RANGE' range_id 'RELOCATE' 'LEASE' 'TO' a_expr
| 'ALTER' 'RANGE' 'RELOCATE' 'VOTERS' 'FROM' a_expr 'TO' a_expr 'FOR' select_stmt
| 'ALTER' 'RANGE' 'RELOCATE' 'FROM' a_expr 'TO' a_expr 'FOR' select_stmt
| 'ALTER' 'RANGE' 'RELOCATE' 'NONVOTERS' 'FROM' a_expr 'TO' a_expr 'FOR' select_stmt
| 'ALTER' 'RANGE' range_id 'RELOCATE' 'VOTERS' 'FROM' a_expr 'TO' a_expr
| 'ALTER' 'RANGE' range_id 'RELOCATE' 'FROM' a_expr 'TO' a_expr
| 'ALTER' 'RANGE' range_id 'RELOCATE' 'NONVOTERS' 'FROM' a_expr 'TO' a_expr
2 changes: 1 addition & 1 deletion docs/generated/sql/bnf/alter_schema.bnf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
alter_schema_stmt ::=
'ALTER' 'SCHEMA' ( name | name '.' name ) 'RENAME' 'TO' schema_name
'ALTER' 'SCHEMA' ( name | name '.' name ) 'RENAME' 'TO' schema_new_name
| 'ALTER' 'SCHEMA' ( name | name '.' name ) 'OWNER' 'TO' role_spec
Loading

0 comments on commit 1a4bcbf

Please sign in to comment.