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

ui: add Transaction and Statement fingerprint id #85464

Merged
merged 1 commit into from
Aug 26, 2022
Merged

ui: add Transaction and Statement fingerprint id #85464

merged 1 commit into from
Aug 26, 2022

Conversation

j82w
Copy link
Contributor

@j82w j82w commented Aug 2, 2022

This adds the Transaction and Statement fingerprint id
to SQL Activity Statements overview page. The columns
are hidden by default.

closes #78509

Screen Shot 2022-08-03 at 7 14 21 AM

Screen Shot 2022-08-03 at 7 21 43 AM

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

Release note (ui change): Adds Transaction and Statement fingerprint
id to correlating SQL Activity overview pages. New columns are
hidden by default.

@j82w j82w requested a review from a team August 2, 2022 15:03
@cockroach-teamcity
Copy link
Member

This change is Reviewable

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.

To clarify, the issues is to add the stmt/txn IDs to their respective overview pages, that is because the same row on the statement overview can have multiple transaction fingerprint IDs. So on this issue you should add only the Statement Fingerprint ID to the Statement overview table, and only the Transaction Fingerprint ID to the Transactions overview table.

Can you also add the ability to search on those fields?

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

@j82w j82w requested a review from maryliag August 3, 2022 20:20
Copy link
Contributor Author

@j82w j82w left a comment

Choose a reason for hiding this comment

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

Fixed in latest iteration

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @maryliag)

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.

just a few nits

Reviewed 7 of 8 files at r2.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @j82w and @maryliag)


pkg/ui/workspaces/cluster-ui/src/statsTableUtil/statsTableUtil.tsx line 61 at r2 (raw file):

  workloadPct: "% of All Runtime",
  lastExecTimestamp: "Last Execution Time (UTC)",
  statementFingerPrintId: "Statement Fingerprint ID",

nit: statementFingerprintID and transactionFingerprintID (and all usages like this in other locations)


pkg/ui/workspaces/cluster-ui/src/statsTableUtil/statsTableUtil.tsx line 226 at r2 (raw file):

        style="tableTitle"
        placement="bottom"
        content={"The statement finger print id."}

nit: The statement fingerprint ID.


pkg/ui/workspaces/cluster-ui/src/statsTableUtil/statsTableUtil.tsx line 237 at r2 (raw file):

        style="tableTitle"
        placement="bottom"
        content={"The transaction finger print id."}

nit: The transaction fingerprint ID.

Copy link
Contributor Author

@j82w j82w left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @maryliag)


pkg/ui/workspaces/cluster-ui/src/statsTableUtil/statsTableUtil.tsx line 226 at r2 (raw file):

Previously, maryliag (Marylia Gutierrez) wrote…

nit: The statement fingerprint ID.

Please take a look at the expanded text.

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.

Reviewed 3 of 3 files at r3, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @j82w)


-- commits line 5 at r3:
To close the issue, this commit would also need the capability to search for the stmt/txn IDs on the search input of each page
from the comment here: #78509 (comment)


pkg/ui/workspaces/cluster-ui/src/statsTableUtil/statsTableUtil.tsx line 226 at r2 (raw file):

Previously, j82w wrote…

Please take a look at the expanded text.

Looks good!

Copy link
Contributor Author

@j82w j82w left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @maryliag)


-- commits line 5 at r3:

Previously, maryliag (Marylia Gutierrez) wrote…

To close the issue, this commit would also need the capability to search for the stmt/txn IDs on the search input of each page
from the comment here: #78509 (comment)

I added search support for the column. Do you think it would be better to add another field to AggregateStatistics to avoid needing to convert it back to a long then to hex?

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.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @j82w and @maryliag)


-- commits line 5 at r3:

Previously, j82w wrote…

I added search support for the column. Do you think it would be better to add another field to AggregateStatistics to avoid needing to convert it back to a long then to hex?

I think is worth it, otherwise there is a lot of conversion going on.


pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.tsx line 180 at r4 (raw file):

    }

    return matchFingerPrintId.includes(search);

you can just do return matchString.includes(search) || matchFingerPrintId.includes(search); like you did below

Copy link
Contributor Author

@j82w j82w left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @maryliag)


-- commits line 5 at r3:

Previously, maryliag (Marylia Gutierrez) wrote…

I think is worth it, otherwise there is a lot of conversion going on.

Done.


pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.tsx line 180 at r4 (raw file):

Previously, maryliag (Marylia Gutierrez) wrote…

you can just do return matchString.includes(search) || matchFingerPrintId.includes(search); like you did below

Done.

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.

Reviewed 6 of 7 files at r5.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @j82w and @maryliag)


pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.selectors.ts line 192 at r5 (raw file):

      return {
        aggregatedFingerprintID: stmt.statementFingerprintID,
        aggregatedFingerprintHexID: stmt.statementFingerprintID,

you probably mean aggregatedFingerprintHexID: stmt.statementFingerprintHexID,

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.

Awesome! As long as tests are passing and you made sure the details page (both statement and transactions) are working properly :lgtm:

Reviewed 1 of 1 files at r6, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @j82w)

@j82w j82w changed the title ui: Add Transaction and Statement fingerprint id ui: add Transaction and Statement fingerprint id Aug 9, 2022
to SQL Activity overview page

closes #78509

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

Release note (ui change): Adds Transaction and Statement fingerprint
id to correlating SQL Activity overview pages. New columns are
hidden by default.
@maryliag
Copy link
Contributor

bors r+

@craig
Copy link
Contributor

craig bot commented Aug 26, 2022

Build failed (retrying...):

@craig craig bot merged commit 50256c3 into cockroachdb:master Aug 26, 2022
@craig
Copy link
Contributor

craig bot commented Aug 26, 2022

Build succeeded:

@j82w
Copy link
Contributor Author

j82w commented Aug 29, 2022

blathers backport release-22.1

@blathers-crl
Copy link

blathers-crl bot commented Aug 29, 2022

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from 08f810f to blathers/backport-release-22.1-85464: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch release-22.1 failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

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.

Add statement/transaction fingerprint ID to the overview page
3 participants