-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: fix statement diag reports when min exec latency is null #139342
Conversation
Before fix (point at drt-chaos with |
402ec45
to
b1d462d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TY for fixing! Can you also add to the stmt diags cypress test so we can catch this whenn we eventually enable the test on the roachprod cypress tests?
This bug is very interesting because the API has always returned "0s" when the min_execution_latency
col is null. I wonder if something else changed recently in how we decode the protobuf to js.
b1d462d
to
7e362bc
Compare
Good idea, I'll add this as a separate PR, since it doesn't need to be back ported.
Yeah that's still unclear to me. I'm working on identifying when this started happening |
A bug in db console was resulting in statement diagnostics reports to not work as intended. As a result, activating diagnostics didn't result in the intended state change which showed a user that a diagnostics report is running or downloadble. This was happening in edge cases where reports "minExecutionLatency" response field was null, but the db console expected it to be populated. Now, db console should handle this edge case. This commit also adds nanosecond granularity to the returned StatementDiagnosticsResponse.min_execution_latency field. Previously only the seconds portion of the statement's min_execution_latency was converted into the returned objects duration, but often times this latency will be sub 1 second, resulting in "O" to be returned. Fixes: cockroachdb#139340 Epic: none Release note (bug fix): Fixes a bug where sometimes activating diagnostics for sql activity appears unresponsive, with no state or status update upon activating. Now, the status should always reflect that diagnosticsa are active or that a statement bundle is downloadable.
7e362bc
to
e84396c
Compare
TFTR bors r+ |
139342: ui: fix statement diag reports when min exec latency is null r=kyle-a-wong a=kyle-a-wong A bug in db console was resulting in statement diagnostics reports to not work as intended. As a result, activating diagnostics didn't result in the intended state change which showed a user that a diagnostics report is running or downloadble. This was happening in edge cases where reports "minExecutionLatency" response field was null, but the db console expected it to be populated. Now, db console should handle this edge case. Fixes: #139340 Epic: none Release note (bug fix): Fixes a bug where sometimes activating diagnostics for sql activity appears unresponsive, with no state or status update upon activating. Now, the status should always reflect that diagnosticsa are active or that a statement bundle is downloadable. 139487: crosscluster/logical: permanent job errors should fail LDR job r=kev-cao a=msbutler Previously, permanent job errors would pause the LDR job, like PCR. Since LDR doesn't have a cutover step, we should instead fail the job to provide a clearer UX to the user. Epic: none Release note: none 139491: crosscluster/physical: wait for sip shutdown before cutover r=kev-cao a=msbutler Informs #136588 Release note: none Co-authored-by: Kyle Wong <[email protected]> Co-authored-by: Michael Butler <[email protected]>
Build failed (retrying...): |
bors retry |
Already running a review |
Based on the specified backports for this PR, I applied new labels to the following linked issue(s). Please adjust the labels as needed to match the branches actually affected by the issue(s), including adding any known older branches. Issue #139340: branch-release-24.3, branch-release-25.1. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
After investigation, it was determined that this issue was caused as a result of this PR: #137479, where a change was introduced to not serialize zero-valued durations. This results in the decoding of the duration field to be null on the client side |
A bug in db console was resulting in statement diagnostics reports to not work as intended. As a result, activating diagnostics didn't result in the intended state change which showed a user that a diagnostics report is running or downloadble.
This was happening in edge cases where reports "minExecutionLatency" response field was null, but the db console expected it to be populated. Now, db console should handle this edge case.
Fixes: #139340
Epic: none
Release note (bug fix): Fixes a bug where sometimes activating diagnostics for sql activity appears unresponsive, with no state or status update upon activating. Now, the status should always reflect that diagnosticsa are active or that a statement bundle is downloadable.