forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
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
…db#75058 cockroachdb#75076 cockroachdb#75465 cockroachdb#75504 72665: sql: remove invalid database privileges r=rafiss a=RichardJCai sql: remove invalid database privileges Release note (sql change): SELECT, INSERT, DELETE, UPDATE can no longer be granted/revoked on databases. Previously SELECT, INSERT, DELETE, UPDATE would be converted to ALTER DEFAULT PRIVILEGES on GRANTs and were revokable but now they are no longer revokable either. Resolves cockroachdb#68731 74251: opt: add avgSize stat to statisticsBuilder r=rharding6373 a=rharding6373 We recently added a new table stat, `avgSize`, that is the average size, in bytes, of a table column. This PR is the first in a series of commits to use the new stat for more accurate cost modeling in the optimizer. This commit applies `avgSize` to `statisticsBuilder` in the following ways: * It loads `avgSize` when it fetches table statistics. * It modifies the `avgSize` for some operators (e.g., union) which may affect the average size of a column. * If the `avgSize` is not found for a column (e.g., if it is not in the table statistics or the column is synthesized), a default value of 4 is applied unless all the rows are known to be `NULL`. This change also prints out `avgSize` as part of `EXPLAIN` if stats are requested. It does not affect how queries are costed. Informs: cockroachdb#72332 Release note: None 74831: sql, server: fix errors seen from combined statements endpoint r=Azhng,maryliag a=xinhaoz ## Commit 1 sql, server: use a view to join persisted and in-mem sql stats Partially addresses: cockroachdb#71245 Previously, we created virtual tables to join in-memory and persisted disk statement and transaction statistics. This proved to be inefficient as requests to the the virtual tables lead to full scans of the underlying system tables. This commit utilizes virtual views to combine in-memory and disk stats. The view queries in-memory stats from the virtual tables `crdb_internal.cluster_{statement, transactions}_statistics,` and combines them with the results from the system tables. This allows us to push down query filters into the system tables, leveraging their existing indexes. Release note: None ## Commit 2 sql: decrease stats flush interval to every 10 mins Previously, we flush in-memory sql stats collected by each node on an hourly interval. We have found that this hourly interval might be too conservative, and the size of the returned cluster-wide stats after an hour can also be quite large, sometimes exceeding the gRPC max message size. This commit lowers the flush interval to every 10 minutes. Since we want to continue to aggregate stats on an hourly interval, we introduce a new cluster setting `sql.stats.aggregation.interval` to control the aggregation interval separately from the flush frequency. Release note (sql change): The default sql stats flush interval is now 10 minutes. A new cluster setting `sql.stats.aggregatinon.interval` controls the aggregation interval of sql stats, with a default value of 1 hour. ## Commit 3 server: allow statements EP to optionally exclude stmt or txns stats Closes: cockroachdb#71829 Previously, the /statements endpoint returned cluster-wide in-memory stats, containing both statements and transactions stats. In the past, we've observed the Statements endpoint response being too large for gRPC. Because this endpoint is being used by virtual tables that powers our combined stats api, cluster_{statement,transactions}_stats, we might continue to surpass the gRPC message size in the new api. However, each virtual table only uses roughly half the response size (either statement or txn stats). This commit allows the virtual tables to exclude statement or txn stats from the Statements endpoint resposne by introducing new request parameters to /statements. This reduces the response size in the stats virtual tables. Release note: None 75058: sql: native evaluation support for NotExpr r=yuzefovich a=RajivTS The commit includes the following changes to provide native evaluation support for tree.NotExpr: 1. Defined new operators NotExprProjOp for projection and NotExprSelOp for selection when evaluating the result of a NotExpr 2. Defined NotNullProjOp for projection when the underlying type is non-bool and contains only Nulls. 3. Defined the Next method for both the projection and selection operators. 4. Added test cases for testing the functionality of NotExprProjOp, NotNullProjOp and NotExprSelOp operators. Fixes: cockroachdb#70713 Release note (performance improvement): queries using `NOT expr` syntax can now be evaluated faster in some cases. 75076: schemachanger: columns are not always backfilled in transactions r=fqazi a=fqazi Fixes: cockroachdb#75074 Previously, when multiple columns were added in a transaction, the schema changer incorrectly determined if a backfill was required based on the last column that was added. This was inadequate because in a transaction multiple columns can be added concurrently, where some may require a backfill, and others may not. To address this, this patch checks if any of the columns added need a backfill and uses that to determine if a backfill is required. Release note (bug fix): If multiple columns were added to a table inside a transaction, then none of the columns will be backfilled if the last column did not require a backfill. 75465: ci: add `go_transition_test` support to `bazci` r=rail a=rickystewart These targets have special bespoke output directories for `testlogs`, so we can't find them in the standard location. Also allow `bazci run`. Closes cockroachdb#75184. Release note: None 75504: pkg/sql: add `-linecomment` when building `roleoption` `stringer` file r=maryliag a=rickystewart Release note: None Co-authored-by: richardjcai <caioftherichard@gmail.com> Co-authored-by: rharding6373 <rharding6373@users.noreply.github.com> Co-authored-by: Xin Hao Zhang <xzhang@cockroachlabs.com> Co-authored-by: RajivTS <rajshar.email@gmail.com> Co-authored-by: Faizan Qazi <faizan@cockroachlabs.com> Co-authored-by: Ricky Stewart <ricky@cockroachlabs.com>
- Loading branch information
Showing
160 changed files
with
5,250 additions
and
4,107 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
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.