forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 1
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
54425: sql: add telemetry for partial indexes r=RaduBerinde a=mgartner #### sql: add telemetry for partial index creation This commit adds telemetry counters for the creation of partial index. A counter is also added for the failed creation of a partial inverted index. Release note: None #### opt: add telemetry for partial index usage This commit adds telemetry counters for the usage of a partial index, either in a scan or a lookup join. Release note: None 54453: sql: periodically clear per app transaction statistics map r=otan a=arulajmani For every app, we collect both statement and transaction statistics. This datastructure is periodically reset to ensure it doesn't get unboundedly large. This happens by manually resetting the datastructures inside the app stats map instead of resetting the outer map. Recently, we started collecting transaction statistics here in addition to statement statistics, but we never added code to reset the transaction statistics map. This patch corrects that oversight. Fixes cockroachdb#54452 Release note (bug fix): There was a bug in transaction statistics collection that could let the datastructure grow unboundedly large. This is now fixed, and the resetting happens at the same cadence as statement statistics. Co-authored-by: Marcus Gartner <[email protected]> Co-authored-by: arulajmani <[email protected]>
- Loading branch information
Showing
9 changed files
with
105 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# This file contains telemetry tests for sql.schema partial index creation | ||
# counters. | ||
|
||
feature-allowlist | ||
sql.schema.partial_index | ||
sql.schema.partial_inverted_index_error | ||
---- | ||
|
||
feature-usage | ||
CREATE TABLE a (i INT, INDEX (i) WHERE i > 0) | ||
---- | ||
sql.schema.partial_index | ||
|
||
feature-usage | ||
CREATE TABLE b (i INT, UNIQUE INDEX (i) WHERE i > 0) | ||
---- | ||
sql.schema.partial_index | ||
|
||
feature-usage | ||
CREATE INDEX i ON b (i) WHERE i < 0 | ||
---- | ||
sql.schema.partial_index | ||
|
||
feature-usage | ||
CREATE TABLE c (i INT, j JSON, INVERTED INDEX (j) WHERE i > 0) | ||
---- | ||
error: pq: unimplemented: partial inverted indexes not supported | ||
sql.schema.partial_inverted_index_error | ||
|
||
exec | ||
CREATE TABLE c (i INT, j JSON) | ||
---- | ||
|
||
feature-usage | ||
CREATE INVERTED INDEX i ON c (j) WHERE i > 0 | ||
---- | ||
error: pq: unimplemented: partial inverted indexes not supported | ||
sql.schema.partial_inverted_index_error |
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