-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
75126: roachprod: move default env. vars into config.go and remove the duplicates r=srosenberg a=srosenberg Both, COCKROACH_ENABLE_RPC_COMPRESSION=false and COCKROACH_UI_RELEASE_NOTES_SIGNUP_DISMISSED=true are passed into ENV_VARS of the systemd startup script (start.sh) by default. The same behavior is preserved _modulo_ duplication. Since roachprod can now be initialized either via CLI or API, default env. vars have been consolidated into config.go (used by both). Release note: None 78333: sql: record index usage stats in index joins r=maryliag,Azhng a=xinhaoz Fixes #76173 Previously, the construction of index joins skipped the recording of the primary key for index usage stats. This commit records the use of the primary key if the statement is not of the EXPLAIN variety. Release note (bug fix): Index usage stats are now properly captured for index joins. ---------------------------------- Example: We should expect to see a read from the pkey after an index join. ``` root@:26257/defaultdb> CREATE TABLE test (c1 INT, c2 INT, c3 INT, INDEX(c1, c2)); CREATE TABLE Time: 120ms total (execution 120ms / network 0ms) root@:26257/defaultdb> EXPLAIN select c3 from TEST WHERE c2 > 1 AND c1 = 3; info ------------------------------------------------------------------------------------------------ distribution: local vectorized: true • index join │ estimated row count: 1 │ table: test@test_pkey │ └── • scan estimated row count: 1 (100% of the table; stats collected 49 seconds ago) table: test@test_c1_c2_idx spans: [/3/2 - /3] index recommendations: 1 1. type: index replacement SQL commands: CREATE INDEX ON test (c1, c2) STORING (c3); DROP INDEX test@test_c1_c2_idx; (15 rows) Time: 1ms total (execution 1ms / network 0ms) root@:26257/defaultdb> select c3 from TEST WHERE c2 > 1 AND c1 = 3; c3 ------ (0 rows) Time: 1ms total (execution 1ms / network 0ms) root@:26257/defaultdb> select index_name, index_type, total_reads from crdb_internal.index_usage_statistics AS us JOIN crdb_internal.table_indexes ti ON us.index_id = ti.index_id AND us.table_id = ti.descriptor_id ORDER BY total_reads asc; index_name | index_type | total_reads -----------------+------------+-------------- test_pkey | primary | 1 test_c1_c2_idx | secondary | 1 (2 rows) Time: 7ms total (execution 6ms / network 0ms) ``` 78446: sql: new SQL Stats cluster settings to improve write traffic r=Azhng a=Azhng Resolves #78339 Previously, SQL Stats flushed to system table as soon as the in-memory buffer is full. This means the size of the system tables that back SQL Stats could grow faster than the cleanup job. Additionally, when the SQL Stats flush is disabled, the SQL Stats is unable to collect any more new statement / transaction statistics when the in-memory store is full. This commit introduces two non-public cluster settings: * `sql.stats.flush.minimum_interval`: this setting limits minimum interval between each flush operation. If a flush operation is triggered sooner than what is allowed by the minimum interval, (e.g. when the in-memory SQL Stats store is full), the flush operation is aborted. * `sql.stats.flush.force_cleanup.enabled`: which allows the in-memory SQL Stats to be cleared at the interval specified by `sql.stats.flush.interval`, even if the SQL Stats flush is disabled. This commit also updated the stmt_grouping_in_explicit_txn data driven test to ensure the output order is deterministic. Release note: None 78526: ci: add scripts for bazel-based `ui test`, `ui lint` ci jobs r=rail,jsbarag a=rickystewart These scripts just do the same logic that `dev` does for the same functions. Release note: None Co-authored-by: Stan Rosenberg <[email protected]> Co-authored-by: Xin Hao Zhang <[email protected]> Co-authored-by: Azhng <[email protected]> Co-authored-by: Ricky Stewart <[email protected]>
- Loading branch information
Showing
20 changed files
with
378 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
dir="$(dirname $(dirname $(dirname $(dirname $(dirname "${0}")))))" | ||
|
||
source "$dir/teamcity-support.sh" # For $root | ||
source "$dir/teamcity-bazel-support.sh" # For run_bazel | ||
|
||
tc_start_block "Run UI tests" | ||
run_bazel build/teamcity/cockroach/ci/tests/ui_lint_impl.sh | ||
tc_end_block "Run UI tests" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xeuo pipefail | ||
|
||
bazel build //pkg/cmd/bazci --config=ci | ||
$(bazel info bazel-bin --config=ci)/pkg/cmd/bazci/bazci_/bazci test --config=ci //pkg/ui:lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
dir="$(dirname $(dirname $(dirname $(dirname $(dirname "${0}")))))" | ||
|
||
source "$dir/teamcity-support.sh" # For $root | ||
source "$dir/teamcity-bazel-support.sh" # For run_bazel | ||
|
||
tc_start_block "Run UI tests" | ||
run_bazel build/teamcity/cockroach/ci/tests/ui_test_impl.sh | ||
tc_end_block "Run UI tests" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xeuo pipefail | ||
|
||
bazel build //pkg/cmd/bazci --config=ci | ||
$(bazel info bazel-bin --config=ci)/pkg/cmd/bazci/bazci_/bazci test --config=ci //pkg/ui/workspaces/db-console:karma //pkg/ui/workspaces/cluster-ui:jest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.