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

sqlstats: requests for % of all Runtime in SQL Activity are incorrectly sorted by svcLatency #123841

Closed
dhartunian opened this issue May 8, 2024 · 0 comments · Fixed by #123846
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-support Originated from a customer T-observability

Comments

@dhartunian
Copy link
Collaborator

dhartunian commented May 8, 2024

Describe the problem

To Reproduce

Ran the sqlstats and movr workloads on a cluster, and then opened SQL Activity.
Sorting by top 100 and top 500 produces inconsistent results:

Top 100

Screenshot 2024-05-08 at 15 03 13

Top 500

Screenshot 2024-05-08 at 15 04 59

Expected behavior
The top 100 entries in the top 500 view should be identical.

Environment:

  • CockroachDB version: 23.1.16

Jira issue: CRDB-38567

Epic CRDB-37544

@dhartunian dhartunian added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-observability labels May 8, 2024
@dhartunian dhartunian self-assigned this May 8, 2024
@dhartunian dhartunian added GA-blocker branch-release-23.1 Used to mark GA and release blockers and technical advisories for 23.1 branch-release-23.2 Used to mark GA and release blockers and technical advisories for 23.2 labels May 8, 2024
@dhartunian dhartunian self-assigned this May 8, 2024
dhartunian added a commit to dhartunian/cockroach that referenced this issue May 8, 2024
Previously, when a request was made to the combined stats endpoint on
CRDB with a `PCT_RUNTIME` sort, we'd default to a `svcLatency` sort
instead because of a missing switch case.

This change fills that gap and adds some datadriven tests to inspect
the resulting `WHERE` clauses.

Fixes: cockroachdb#123841
Epic: CRDB-37544

Release note (ui change): Viewing SQL Activity sorted by `% of
Runtime` now correctly sorts entries by the runtime amount.
@dhartunian dhartunian removed GA-blocker branch-release-23.1 Used to mark GA and release blockers and technical advisories for 23.1 branch-release-23.2 Used to mark GA and release blockers and technical advisories for 23.2 labels May 8, 2024
dhartunian added a commit to dhartunian/cockroach that referenced this issue May 8, 2024
Previously, when a request was made to the combined stats endpoint on
CRDB with a `PCT_RUNTIME` sort, we'd default to a `svcLatency` sort
instead because of a missing switch case.

This change fills that gap and adds some datadriven tests to inspect
the resulting `WHERE` clauses.

Fixes: cockroachdb#123841
Epic: CRDB-37544

Release note (ui change): Viewing SQL Activity sorted by `% of
Runtime` now correctly sorts entries by the runtime amount.
dhartunian added a commit to dhartunian/cockroach that referenced this issue May 8, 2024
Previously, when a request was made to the combined stats endpoint on
CRDB with a `PCT_RUNTIME` sort, we'd default to a `svcLatency` sort
instead because of a missing switch case.

This change fills that gap and adds some datadriven tests to inspect
the resulting `WHERE` clauses.

Fixes: cockroachdb#123841
Epic: CRDB-37544

Release note (ui change): Viewing SQL Activity sorted by `% of
Runtime` now correctly sorts entries by the runtime amount.
@dhartunian dhartunian added the O-support Originated from a customer label May 9, 2024
craig bot pushed a commit that referenced this issue May 9, 2024
123846: sqlstats: generate PCT_RUNTIME sort when requested r=xinhaoz a=dhartunian

Previously, when a request was made to the combined stats endpoint on CRDB with a `PCT_RUNTIME` sort, we'd default to a `svcLatency` sort instead because of a missing switch case.

This change fills that gap and adds some datadriven tests to inspect the resulting `WHERE` clauses.

Fixes: #123841
Epic: CRDB-37544

Release note (ui change): Viewing SQL Activity sorted by `% of Runtime` now correctly sorts entries by the runtime amount.

123891: status: fix possible index out of bounds in cpu sampling r=yuzefovich a=yuzefovich

This commit fixes a possible index out of bounds crash that could previously occur when `cpu.Times` returned an error when sampling runtime stats. The bug was introduced in 4b9a337.

Fixes: #120129.

Release note: None

Co-authored-by: David Hartunian <[email protected]>
Co-authored-by: Yahor Yuzefovich <[email protected]>
@craig craig bot closed this as completed in a8636af May 9, 2024
blathers-crl bot pushed a commit that referenced this issue May 9, 2024
Previously, when a request was made to the combined stats endpoint on
CRDB with a `PCT_RUNTIME` sort, we'd default to a `svcLatency` sort
instead because of a missing switch case.

This change fills that gap and adds some datadriven tests to inspect
the resulting `WHERE` clauses.

Fixes: #123841
Epic: CRDB-37544

Release note (ui change): Viewing SQL Activity sorted by `% of
Runtime` now correctly sorts entries by the runtime amount.
blathers-crl bot pushed a commit that referenced this issue May 9, 2024
Previously, when a request was made to the combined stats endpoint on
CRDB with a `PCT_RUNTIME` sort, we'd default to a `svcLatency` sort
instead because of a missing switch case.

This change fills that gap and adds some datadriven tests to inspect
the resulting `WHERE` clauses.

Fixes: #123841
Epic: CRDB-37544

Release note (ui change): Viewing SQL Activity sorted by `% of
Runtime` now correctly sorts entries by the runtime amount.
blathers-crl bot pushed a commit that referenced this issue May 9, 2024
Previously, when a request was made to the combined stats endpoint on
CRDB with a `PCT_RUNTIME` sort, we'd default to a `svcLatency` sort
instead because of a missing switch case.

This change fills that gap and adds some datadriven tests to inspect
the resulting `WHERE` clauses.

Fixes: #123841
Epic: CRDB-37544

Release note (ui change): Viewing SQL Activity sorted by `% of
Runtime` now correctly sorts entries by the runtime amount.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-support Originated from a customer T-observability
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant