cluster-ui: add sql api request wrapper and clusterLocks request#85080
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Aug 8, 2022
Merged
cluster-ui: add sql api request wrapper and clusterLocks request#85080craig[bot] merged 1 commit intocockroachdb:masterfrom
craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
Member
Contributor
Author
|
This is waiting on #84617 to merge. |
matthewtodd
approved these changes
Jul 27, 2022
ericharmeling
approved these changes
Jul 27, 2022
ericharmeling
left a comment
There was a problem hiding this comment.
Thanks for doing this work! I was able to use it as a basis for #84612. Doing the same for the details page too.
Reviewed 3 of 4 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @xinhaoz)
This commit allows DB Console to use the SQL over HTTP API from `/api/v2/sql/`. A new fetch wrapper providing the custom header necessary for the API and using content type JSON has been added. The clusterLocksApi components added in this commit use the above SQL api functions to query from the `crdb_internal.cluster_locks` table. Release note: None
Contributor
Author
|
TFTR! |
Contributor
|
Build succeeded: |
craig bot
pushed a commit
that referenced
this pull request
Aug 11, 2022
81995: colexec: derive a tracing span in materializer when collecting stats r=yuzefovich a=yuzefovich If we don't do this, then the stats would be attached to the span of the materializer's user, and if that user itself has a lot of payloads to attach (e.g. a joinReader attaching the KV keys it looked up), then the stats might be dropped based on the maximum size of structured payload per tracing span of 10KiB (see `tracing.maxStructuredBytesPerSpan`). Deriving a separate span guarantees that the stats won't be dropped. This required some changes to make a test - that makes too many assumptions about tracing infra - work. Release note: None 84358: sql/tests: TestRandomSyntaxSchemaChangeColumn use a resettable timeout r=fqazi a=fqazi fixes #65736 Previously, TestRandomSyntaxSchemaChangeColumn had a fixed timeout, which meant that if schema change got stuck behind each other, this timeout may not have been sufficient. Previously, we tried bumping up this timeout, but this is not the most reliable for this test. To address this, this patch introduces the concept of resettable timeouts, which states that the timeout expires only if no other statements are complete within the given timeout (otherwise, its recalculated since the completion of the last statement. To avoid potential starvation there is a limit on the number of resets, which guarantees eventual expiry if a query is always bypassed. Release note: None 85081: ui/cluster-ui: add wait time insights to active executions r=xinhaoz a=xinhaoz Closes: #79127 Closes: #79131 This commit introduces a new section, 'Wait Time Insights' to the active stmts/txns details pages. The section is included if the txn being viewed is experiencing contention and includes info on the blocked schema, table, index name, time spent blocking, and the executions blocking or waiting for the viewed execution. The section is powered by querying the `crdb_internal.cluster_locks` table via the SQL api in `/api/v2/`. The table informatioin is refreshed at an interval of 10s while on active execution pages, and is requested along with session information (to give info on active txns/stmts). Only users having VIEWACTIVITY or higher permissions can view this feature. Refactor note: to remove duplication across shared selector logic in the active txn components, `activeExecutionsCommon.selectors.ts` has been created. This file exports combiner functions for active txn selectors. The combiner func step contains the bulk of the logic to transform data from the redux state to component props, thus future changes to this logic will not need to be duplicated across packages. Release note (ui change): A new section, 'Wait Time Insights' has been added to the active statement and transaction details page. The section is included if the txn being viewed is experiencing contention and includes info on the blocked schema, table, index name, time spent blocking, and the txns blocking or waiting for the viewed txn. Only users having `VIEWACTIVITY` or higher can view this feature. The column 'Time Spent Waiting' has been added to the active executions tables that shows the total amount of time an execution has been waiting for a lock. -------------- ### Note to reviewers: only the 2nd commit is relevant, see first commit here: #85080 https://www.loom.com/share/53d8a74f9c9041a9b967e32dc370a153 Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com> Co-authored-by: Faizan Qazi <faizan@cockroachlabs.com> Co-authored-by: Xin Hao Zhang <xzhang@cockroachlabs.com>
craig bot
pushed a commit
that referenced
this pull request
Aug 12, 2022
84612: ui: add insights overview page v1 r=maryliag a=ericharmeling This commit adds the v1 Insights page to the DB Console, via the cluster-ui package. The v1 Insights page only includes a Transactions Insights overview page, populated with information served a new "endpoint" built on top of the SQL-over-HTTP API. Note this PR is dependent on the changes in #84617 and #85080. After #84998 is merged with all the needed columns, we can rewrite the insights API to query the internal insights table. Fixes #83774. Release note (ui change): Added new Insights page to DB Console 85757: backupccl,importer: remove `at_current_time` cluster settings r=adityamaru a=erikgrinaker Release note (ops change): The cluster settings `bulkio.restore_at_current_time.enabled` and `bulkio.import_at_current_time.enabled`, which were introduced in 22.1 and defaulted to `true`, have been retired. They are now in effect always enabled. Co-authored-by: Eric Harmeling <eric.harmeling@cockroachlabs.com> Co-authored-by: Erik Grinaker <grinaker@cockroachlabs.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit allows DB Console to use the SQL over HTTP API from
/api/v2/sql/. A new fetch wrapper providing the custom headernecessary for the API and using content type JSON has been added.
The clusterLocksApi components added in this commit use the above
SQL api functions to query from the
crdb_internal.cluster_lockstable.
Release note: None