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

Always increment timer on record #2298

Merged
merged 1 commit into from
Apr 20, 2022

Conversation

tustvold
Copy link
Contributor

Rationale for this change

#2261 added a test that elapsed_compute was recorded in metrics, unfortunately in the case of LocalLimitExec and GlobalLimitExec the operator body is too small to reliable take time, and as such this test is flaky

Additionally when rendering plan metrics, a value if 0 is translated to "NOT RECORDED" - https://github.com/apache/arrow-datafusion/blob/master/datafusion/core/src/physical_plan/metrics/value.rs#L540

What changes are included in this PR?

This changes Time::add_duration and Time::add to always record at least one nanosecond.

Are there any user-facing changes?

Yes, calling Timer::add_duration will now always record at least 1 nanosecond

@github-actions github-actions bot added the datafusion Changes in the datafusion crate label Apr 20, 2022
@tustvold tustvold force-pushed the timer-always-increment branch from 2061877 to cef7f09 Compare April 20, 2022 21:05
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you

@alamb
Copy link
Contributor

alamb commented Apr 20, 2022

ITS TOO FAST!

@tustvold tustvold merged commit baa2a36 into apache:master Apr 20, 2022
@yjshen
Copy link
Member

yjshen commented Apr 21, 2022

Thanks for the fixing!

I found this test flaky and added the assertion failure message in #2261 but failed to reproduce it in later trials.

Previous failure before the assertion log:
https://github.com/apache/arrow-datafusion/runs/6091653680?check_suite_focus=true

@yjshen
Copy link
Member

yjshen commented Apr 21, 2022

I manually rerun all failure checks for the latest PRs because of this flaky test.

mcheshkov pushed a commit to cube-js/arrow-datafusion that referenced this pull request Aug 22, 2024
Can drop this after rebase on commit baa2a36 "Always increment timer on record (apache#2298)", first released in 8.0.0
mcheshkov pushed a commit to cube-js/arrow-datafusion that referenced this pull request Aug 30, 2024
Can drop this after rebase on commit baa2a36 "Always increment timer on record (apache#2298)", first released in 8.0.0
mcheshkov pushed a commit to cube-js/arrow-datafusion that referenced this pull request Aug 30, 2024
Can drop this after rebase on commit baa2a36 "Always increment timer on record (apache#2298)", first released in 8.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datafusion Changes in the datafusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants