You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
142826: sql: add latency metrics for historical queries r=BramGruneir a=BramGruneir
This commit adds 4 new latency metrics specifically to separate out AOST queries:
* sql.exec.latency.consistent -- Latency of SQL statement execution of non-historical queries
* sql.exec.latency.historical -- Latency of SQL statement execution of historical queries
* sql.service.latency.consistent -- Latency of SQL request execution of non-historical queries
* sql.service.latency.historical -- Latency of SQL request execution of historical queries
This will help when trying to optimize workloads that have a combination of historical and non-historical queries.
Fixes: #121507
Part of: https://cockroachlabs.atlassian.net/browse/CRDB-37293
Part of: https://cockroachlabs.atlassian.net/browse/TREQ-152
Part of: https://cockroachlabs.atlassian.net/browse/FEB-22
Release note (ops change): Added 4 new latency metrics: sql.service.latency.historical, sql.service.latency.consistent, sql.exec.latency.historical, sql.exec.latency.consistent for better query
optimizations.
143598: roachtest: handle flaky node-postgres tests r=Dedej-Bergin a=Dedej-Bergin
Previously, we would only handle the "pool size of 1" flaky test in the node-postgres roachtest. However, there is another flaky test "events" which fails with "expected 0 to equal 20". This change updates the error handling to properly handle both known flaky tests while maintaining the existing behavior of failing on any other errors.
Fixes: #143047
Release note: none
144091: server: add information filtering to hot ranges endpoint r=angles-n-daemons a=angles-n-daemons
server: add information filtering to hot ranges endpoint
This change introduces two enhancements to the hot ranges page. The first is the omission of table descriptors if specified, the second allows callers to specify per-node limits on the number of ranges requested.
Specifying `StatsOnly` on the hot ranges call will cause the call to skip collecting table descriptors to include in the response, which means the call will not be required to read from the keyspace.
The `PerNodeLimit` specifies a local limit for a hot ranges call, so that we only include a number of replicas for each node local call made, (different than the global limit enforced today).
Fixes: #142595
Epic: CRDB-43150
Release note (general change): Allows api callers to specify statistics only and a per-node limit for the hot ranges response.
144188: jsonpath: separate `silent` error and `strict` structural checks r=normanchenn a=normanchenn
The `jsonb_path_*` functions include a `silent` argument, and JSONPath queries have a `strict` mode. Previously, the implementation combined these variables, treating `silent=true` as equivalent to forcing lax mode (`strict=false`).
However, `strict` mode primary handles errors related to structural issues, whereas `silent` controls whether runtime errors encountered during path evaluation should cause the query to fail or are suppressed.
This commit refactors the evaluation context (`jsonpathCtx`) to handle these distinctly.
Epic: None
Release note: None
Co-authored-by: BramGruneir <[email protected]>
Co-authored-by: Bergin Dedej <[email protected]>
Co-authored-by: Brian Dillmann <[email protected]>
Co-authored-by: Norman Chen <[email protected]>
| per_node_limit |[int32](#cockroach.server.serverpb.HotRangesRequest-int32)|| per_node_limit indicates the maximum number of hot ranges to return for each node. If left empty, the default is 128. |[reserved](#support-status)|
3603
+
| stats_only |[bool](#cockroach.server.serverpb.HotRangesRequest-bool)|| stats_only indicates whether to return only the stats for the hot ranges, without pulling descriptor information. |[reserved](#support-status)|
Copy file name to clipboardExpand all lines: docs/generated/metrics/metrics.html
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1695,8 +1695,12 @@
1695
1695
<tr><td>APPLICATION</td><td>sql.distsql.service.latency.internal</td><td>Latency of DistSQL request execution (internal queries)</td><td>SQL Internal Statements</td><td>HISTOGRAM</td><td>NANOSECONDS</td><td>AVG</td><td>NONE</td></tr>
1696
1696
<tr><td>APPLICATION</td><td>sql.distsql.vec.openfds</td><td>Current number of open file descriptors used by vectorized external storage</td><td>Files</td><td>GAUGE</td><td>COUNT</td><td>AVG</td><td>NONE</td></tr>
1697
1697
<tr><td>APPLICATION</td><td>sql.exec.latency</td><td>Latency of SQL statement execution</td><td>Latency</td><td>HISTOGRAM</td><td>NANOSECONDS</td><td>AVG</td><td>NONE</td></tr>
1698
+
<tr><td>APPLICATION</td><td>sql.exec.latency.consistent</td><td>Latency of SQL statement execution of non-historical queries</td><td>Latency</td><td>HISTOGRAM</td><td>NANOSECONDS</td><td>AVG</td><td>NONE</td></tr>
1699
+
<tr><td>APPLICATION</td><td>sql.exec.latency.consistent.internal</td><td>Latency of SQL statement execution of non-historical queries (internal queries)</td><td>SQL Internal Statements</td><td>HISTOGRAM</td><td>NANOSECONDS</td><td>AVG</td><td>NONE</td></tr>
1698
1700
<tr><td>APPLICATION</td><td>sql.exec.latency.detail</td><td>Latency of SQL statement execution, by statement fingerprint</td><td>Latency</td><td>HISTOGRAM</td><td>NANOSECONDS</td><td>AVG</td><td>NONE</td></tr>
1699
1701
<tr><td>APPLICATION</td><td>sql.exec.latency.detail.internal</td><td>Latency of SQL statement execution, by statement fingerprint (internal queries)</td><td>SQL Internal Statements</td><td>HISTOGRAM</td><td>NANOSECONDS</td><td>AVG</td><td>NONE</td></tr>
1702
+
<tr><td>APPLICATION</td><td>sql.exec.latency.historical</td><td>Latency of SQL statement execution of historical queries</td><td>Latency</td><td>HISTOGRAM</td><td>NANOSECONDS</td><td>AVG</td><td>NONE</td></tr>
1703
+
<tr><td>APPLICATION</td><td>sql.exec.latency.historical.internal</td><td>Latency of SQL statement execution of historical queries (internal queries)</td><td>SQL Internal Statements</td><td>HISTOGRAM</td><td>NANOSECONDS</td><td>AVG</td><td>NONE</td></tr>
1700
1704
<tr><td>APPLICATION</td><td>sql.exec.latency.internal</td><td>Latency of SQL statement execution (internal queries)</td><td>SQL Internal Statements</td><td>HISTOGRAM</td><td>NANOSECONDS</td><td>AVG</td><td>NONE</td></tr>
1701
1705
<tr><td>APPLICATION</td><td>sql.failure.count</td><td>Number of statements resulting in a planning or runtime error</td><td>SQL Statements</td><td>COUNTER</td><td>COUNT</td><td>AVG</td><td>NON_NEGATIVE_DERIVATIVE</td></tr>
1702
1706
<tr><td>APPLICATION</td><td>sql.failure.count.internal</td><td>Number of statements resulting in a planning or runtime error (internal queries)</td><td>SQL Internal Statements</td><td>COUNTER</td><td>COUNT</td><td>AVG</td><td>NON_NEGATIVE_DERIVATIVE</td></tr>
@@ -1819,6 +1823,10 @@
1819
1823
<tr><td>APPLICATION</td><td>sql.select.started.count</td><td>Number of SQL SELECT statements started</td><td>SQL Statements</td><td>COUNTER</td><td>COUNT</td><td>AVG</td><td>NON_NEGATIVE_DERIVATIVE</td></tr>
1820
1824
<tr><td>APPLICATION</td><td>sql.select.started.count.internal</td><td>Number of SQL SELECT statements started (internal queries)</td><td>SQL Internal Statements</td><td>COUNTER</td><td>COUNT</td><td>AVG</td><td>NON_NEGATIVE_DERIVATIVE</td></tr>
1821
1825
<tr><td>APPLICATION</td><td>sql.service.latency</td><td>Latency of SQL request execution</td><td>Latency</td><td>HISTOGRAM</td><td>NANOSECONDS</td><td>AVG</td><td>NONE</td></tr>
1826
+
<tr><td>APPLICATION</td><td>sql.service.latency.consistent</td><td>Latency of SQL request execution of non-historical queries</td><td>Latency</td><td>HISTOGRAM</td><td>NANOSECONDS</td><td>AVG</td><td>NONE</td></tr>
1827
+
<tr><td>APPLICATION</td><td>sql.service.latency.consistent.internal</td><td>Latency of SQL request execution of non-historical queries (internal queries)</td><td>SQL Internal Statements</td><td>HISTOGRAM</td><td>NANOSECONDS</td><td>AVG</td><td>NONE</td></tr>
1828
+
<tr><td>APPLICATION</td><td>sql.service.latency.historical</td><td>Latency of SQL request execution of historical queries</td><td>Latency</td><td>HISTOGRAM</td><td>NANOSECONDS</td><td>AVG</td><td>NONE</td></tr>
1829
+
<tr><td>APPLICATION</td><td>sql.service.latency.historical.internal</td><td>Latency of SQL request execution of historical queries (internal queries)</td><td>SQL Internal Statements</td><td>HISTOGRAM</td><td>NANOSECONDS</td><td>AVG</td><td>NONE</td></tr>
1822
1830
<tr><td>APPLICATION</td><td>sql.service.latency.internal</td><td>Latency of SQL request execution (internal queries)</td><td>SQL Internal Statements</td><td>HISTOGRAM</td><td>NANOSECONDS</td><td>AVG</td><td>NONE</td></tr>
1823
1831
<tr><td>APPLICATION</td><td>sql.statement_timeout.count</td><td>Count of statements that failed because they exceeded the statement timeout</td><td>SQL Statements</td><td>COUNTER</td><td>COUNT</td><td>AVG</td><td>NON_NEGATIVE_DERIVATIVE</td></tr>
1824
1832
<tr><td>APPLICATION</td><td>sql.statement_timeout.count.internal</td><td>Count of statements that failed because they exceeded the statement timeout (internal queries)</td><td>SQL Internal Statements</td><td>COUNTER</td><td>COUNT</td><td>AVG</td><td>NON_NEGATIVE_DERIVATIVE</td></tr>
0 commit comments