-
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
server: return elapsed time for active executions #88384
Conversation
b9a80ca
to
cb8eda2
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.
you added the label to backport to 22.1, but this feature didn't exist on 22.1
Reviewed 12 of 12 files at r1, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @xinhaoz)
Previously, we calculated the time elapsed for an active stmt or txn based on the start time returned from the server and the time the response was last received. Calculating this value on the client is not reliable and can lead to negative values when the server time is slightly ahead. This commit fixes this issue by including the time elapsed as part of the active txns and stmts response. Release note (bug fix): time elapsed for active txns and stmts is never negative.
cb8eda2
to
ac0d5b7
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.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @maryliag and @xinhaoz)
pkg/ui/workspaces/cluster-ui/src/activeExecutions/execTableCommon.tsx
line 191 at r2 (raw file):
title: executionsTableTitles.elapsedTime(execType), cell: (item: ActiveExecution) => Duration(item.elapsedTime.asMilliseconds() * 1e6),
Hmm, I see it was like this before, but is it a bug that we multiply milliseconds by 1,000,000? I'd expect to see 1,000.
Previously, matthewtodd (Matthew Todd) wrote…
Yep, I want nanoseconds here since that is what the Duration function expects so that's why I used 1e6. There's no asNanoseconds function for durations unfortunately :( |
Test failure unrelated. |
Build succeeded: |
Previously, xinhaoz (Xin Hao Zhang) wrote…
Oh, right, I was thinking backwards. Thank you! |
Previously, we calculated the time elapsed for an active stmt or txn based on the start time returned from the server and the time the response was last received. Calculating this value on the client is not reliable and can lead to negative values when the server time is slightly ahead. This commit fixes this issue by including the time elapsed as part of the active txns and stmts response.
Release note (bug fix): time elapsed for active txns and stmts is never negative.