-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
#352: BallistaContext::collect() logging is too noisy #394
#352: BallistaContext::collect() logging is too noisy #394
Conversation
…nfo messages for trace inside collect loop # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Sun May 23 12:07:25 2021 +0200 # # On branch ballista_context_collect_info # Changes to be committed: # modified: ballista/rust/client/src/context.rs #
…nfo messages for trace inside collect loop
…ow-datafusion into ballista_context_collect_info
Codecov Report
@@ Coverage Diff @@
## master #394 +/- ##
==========================================
+ Coverage 74.94% 75.33% +0.39%
==========================================
Files 146 147 +1
Lines 24314 24788 +474
==========================================
+ Hits 18221 18673 +452
- Misses 6093 6115 +22
Continue to review full report at Codecov.
|
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.
Thanks @jgoday. With this change we will never see output saying that the query is running unless we have trace logging enabled. Would it be possible to show the message with info logging on the first time we see that the job is running?
@andygrove Is ok if we use a flag (first time a job_id is logged) and define a macro info_or_trace_if like ? macro_rules! info_or_trace_if {
($first:ident, $($arg:tt)+) => (
if $first {
info!($($arg)+);
} else {
trace!($($arg)+);
}
$first = false;
)
} |
Perhaps we should just log the status if the status has changed since the last time round the loop? |
@andygrove I have changed the condition to call info/trace to check the job's prev status. |
Nice. I think we can just log with |
Ok, I have changed it that way. |
ballista/rust/client/src/context.rs
Outdated
@@ -198,14 +200,21 @@ impl BallistaContext { | |||
DataFusionError::Internal("Received empty status message".to_owned()) | |||
})?; | |||
let wait_future = tokio::time::sleep(Duration::from_millis(100)); | |||
let has_status_change = prev_status.map(|x| x != status).unwrap_or(false); |
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.
let has_status_change = prev_status.map(|x| x != status).unwrap_or(false); | |
let has_status_change = prev_status.map(|x| x != status).unwrap_or(true); |
I think the default should be true
here. If there was no previous status then the status must have changed?
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 are right, sorry for the mistake :(
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.
LGTM. I haven't tested this, but plan on doing so tonight. I will merge once I have confirmed that this works as expected.
Thanks @jgoday!
❤️ |
Which issue does this PR close?
Fix #352.
Rationale for this change
See #352 (logging too noisy inside BallistaContext::collect() inner loop).
What changes are included in this PR?
Change info messages for trace inside collect loop.
Are there any user-facing changes?
N/A