-
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.
Browse files
Browse the repository at this point in the history
118995: schemachanger: support CREATE SCHEMA ... AUTHORIZATION r=fqazi a=annrpom This patch enables support for `CREATE SCHEMA ... AUTHORIZATION` in the declarative schema changer Fixes: #115369 Epic: [CRDB-31331](https://cockroachlabs.atlassian.net/browse/CRDB-31331) Release note: None 119752: sqlstats: dont block flush due to sql activity job r=xinhaoz a=xinhaoz The sql stats flush worker signals the sql activity update job on flush completion via an unbuffered channel. It currently blocks on sending that signal so if that job is stuck updating stats for some reason this also makes the flush stuck. This commit ensures that the flush worker can continue normally even if the sql activity update job is not ready to receive its next signal. This ensures that the coordinator node for the sql stats activity job can continue to collect sql stats normally. Epic: none Fixes: #119751 119971: sqlstats: skip TestTransactionServiceLatencyOnExtendedProtocol r=xinhaoz a=xinhaoz Skip this test until we fix the data race caused by the testing knob functions. Epic: none Release note: None 119977: sqlstats: add retries to stats test on locked table r=xinhaoz a=dhartunian Previously, the `TestSQLStatsReadLimitSizeOnLockedTable` test would fail very occasionally due to a rare scenario. When stats are written, they contain a column that's a hashed shard index. It's expected that statements are uniformly distributed across this shard, but that's not guaranteed. Later in the test we check a random shard to make sure its stats count exceeds a minimum of 1 (because we place a total lower bound of 8 in the cluster setting, which is then divided by 8 to derive the per-shard limit). This case will occasionally fail if the random shard that's picked happens to only contain a single statement within. This change modifies the loop at the end of the test to expect a `false` value and make sure to get at least a single `true` result after 3 iterations, instead of requiring 3 `true` results every single time. The requirement that the queries run despite contention will still stand since we'll return an error in that case. Resolves: #119067 Epic: None Release note: None 119999: sql: fix mixed version test for node-level sequence caching r=jasminejsun a=jasminejsun Fix mixed version test for node-level sequence caching by making it wait for upgrade to complete. Epic: none Fixes: #119978 Release note: None 120005: logictest: update cache size for on-disk logictest configs r=rafiss a=rafiss The default cache size is 128MB. This can result in disk-related slowdowns for normal operations. Now we configure a larger cache so that we avoid disk access. fixes #119897 Release note: None Co-authored-by: Annie Pompa <[email protected]> Co-authored-by: Xin Hao Zhang <[email protected]> Co-authored-by: David Hartunian <[email protected]> Co-authored-by: Jasmine Sun <[email protected]> Co-authored-by: Rafi Shamim <[email protected]>
- Loading branch information
Showing
19 changed files
with
117 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1600,10 +1600,10 @@ def go_deps(): | |
name = "com_github_cockroachdb_cockroach_go_v2", | ||
build_file_proto_mode = "disable_global", | ||
importpath = "github.com/cockroachdb/cockroach-go/v2", | ||
sha256 = "70860a2615f3df73f7d00b4801b1fffe30a3306ae1cda1e9bf5245bb74e86d9a", | ||
strip_prefix = "github.com/cockroachdb/cockroach-go/[email protected].5", | ||
sha256 = "028c29c79c2d373bca3ce9a475291285fdcb68a2f908190f738d5ce605edbd07", | ||
strip_prefix = "github.com/cockroachdb/cockroach-go/[email protected].7", | ||
urls = [ | ||
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/cockroach-go/v2/com_github_cockroachdb_cockroach_go_v2-v2.3.5.zip", | ||
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/cockroach-go/v2/com_github_cockroachdb_cockroach_go_v2-v2.3.7.zip", | ||
], | ||
) | ||
go_repository( | ||
|
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
6 changes: 5 additions & 1 deletion
6
pkg/sql/schemachanger/testdata/end_to_end/create_schema/create_schema.definition
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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
setup | ||
CREATE USER foo WITH LOGIN PASSWORD 'bar'; | ||
---- | ||
|
||
test | ||
CREATE SCHEMA sc; | ||
CREATE SCHEMA sc AUTHORIZATION foo; | ||
---- |
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
5 changes: 3 additions & 2 deletions
5
pkg/sql/schemachanger/testdata/end_to_end/create_schema/create_schema.explain_shape
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
/* setup */ | ||
CREATE USER foo WITH LOGIN PASSWORD 'bar'; | ||
|
||
/* test */ | ||
EXPLAIN (DDL, SHAPE) CREATE SCHEMA sc; | ||
EXPLAIN (DDL, SHAPE) CREATE SCHEMA sc AUTHORIZATION foo; | ||
---- | ||
Schema change plan for CREATE SCHEMA ‹defaultdb›.‹sc›; | ||
Schema change plan for CREATE SCHEMA ‹defaultdb›.‹sc› AUTHORIZATION foo; | ||
└── execute 1 system table mutations transaction |
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