Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-22.2: add connected components for insights #90860

Conversation

ericharmeling
Copy link
Contributor

@ericharmeling ericharmeling commented Oct 28, 2022

Backport:

Please see individual PRs for details.

/cc @cockroachdb/release

Release justification: Bug fixes and low-risk updates to new functionality

Here's a loom of CC console built on the cluster-ui from this branch, and on https://github.com/cockroachlabs/managed-service/pull/10097, with the value for implicit_txn hardcoded (this column is added in #90100): https://www.loom.com/share/65ec1daa345d41089e6a3a60a866a703

ericharmeling and others added 6 commits October 28, 2022 13:59
This commit adds connected components for the workload and schema insights pages, for use
in the CC Console.

Fixes cockroachdb#87693.

Release note: None
This commit refactors the statement insight details page
component from a class component to a functional component.

Release note: None
Closes cockroachdb#88093

This commit adds a new tab to the statement insight details
page. The page is now separated into two tabs:
1. Overview - what was already  on the page (insights details)
2. Explain Plan - the explain plan for the stmt being viewed

Release note (ui change): new tab view added to the stmt insight
details page:
1. Overview - what was already  on the page (insights details)
2. Explain Plan - the explain plan for the stmt being viewed
Now from the Insights page, clicking on the statement
or fingerprint ids, it will bring you to their respective
details page.

This commit also filter out transaction insights that didn't
have their value set yet (meaning they're still 0).

Finally, this commit fixes the start/end values being passed
to the combined statement endpoint, to the correct rounded
values, aligning what we say on the UI.

Fixes cockroachdb#87750

Release note (ui change): The fingerprint id values
for statement and transactions on the insights pages are
links that open the respective details page on the time period
of the execution of that statement/transaction.

Release note (bug fix): Sendind the proper start/end values
to the endpoint used on SQL Activity page, now returning the
full hour as described on the UI.
This commit adds a useEffect hook to the statement insight
details page that refreshes the statement insights store
when it's empty.

Fixes cockroachdb#90385.

Release note: None
… selector

This commit simplifies the insights sagas by moving the insights store
refresh interval to the components and removing the root-level reset saga.
The commit also updates the SQL query for the transaction contention events
to not JOIN with the internal insights table, and to filter out all
unresolved txn fingerprint IDs. The commit also properly handles the case
in which no columns are selected.

Fixes cockroachdb#90142.

Release note: None
@blathers-crl
Copy link

blathers-crl bot commented Oct 28, 2022

Thanks for opening a backport.

Please check the backport criteria before merging:

  • Patches should only be created for serious issues or test-only changes.
  • Patches should not break backwards-compatibility.
  • Patches should change as little code as possible.
  • Patches should not change on-disk formats or node communication protocols.
  • Patches should not add new functionality.
  • Patches must not add, edit, or otherwise modify cluster versions; or add version gates.
If some of the basic criteria cannot be satisfied, ensure that the exceptional criteria are satisfied within.
  • There is a high priority need for the functionality that cannot wait until the next release and is difficult to address in another way.
  • The new functionality is additive-only and only runs for clusters which have specifically “opted in” to it (e.g. by a cluster setting).
  • New code is protected by a conditional check that is trivial to verify and ensures that it only runs for opt-in clusters.
  • The PM and TL on the team that owns the changed code have signed off that the change obeys the above rules.

Add a brief release justification to the body of your PR to justify this backport.

Some other things to consider:

  • What did we do to ensure that a user that doesn’t know & care about this backport, has no idea that it happened?
  • Will this work in a cluster of mixed patch versions? Did we test that?
  • If a user upgrades a patch version, uses this feature, and then downgrades, what happens?

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@ericharmeling ericharmeling changed the title release-22.2: TODO release-22.2: add connected components for insights Oct 28, 2022
This commit adds a new column `implicit_txn` (boolean) to:
- `crdb_internal.cluster_execution_insights`
- `crdb_internal.node_execution_insights`

Part Of cockroachdb#87750

Release note (sql change): Adds a new column `implicit_txn`
(boolean) to `crdb_internal.cluster_execution_insights` and
`crdb_internal.node_execution_insights`
@ericharmeling ericharmeling requested a review from a team October 28, 2022 20:04
@ericharmeling ericharmeling marked this pull request as ready for review October 28, 2022 20:04
@ericharmeling ericharmeling requested a review from a team October 28, 2022 20:04
Copy link
Contributor

@maryliag maryliag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants