-
Notifications
You must be signed in to change notification settings - Fork 902
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
fix checkAllLedgersDuration compute #2970
fix checkAllLedgersDuration compute #2970
Conversation
rerun failure checks |
16 similar comments
rerun failure checks |
rerun failure checks |
rerun failure checks |
rerun failure checks |
rerun failure checks |
rerun failure checks |
rerun failure checks |
rerun failure checks |
rerun failure checks |
rerun failure checks |
rerun failure checks |
rerun failure checks |
rerun failure checks |
rerun failure checks |
rerun failure checks |
rerun failure checks |
ping |
@dlg99 PTAL,thanks! |
ping |
1 similar comment
ping |
ping. |
@pkumar-singh PTAL,thanks! |
ping |
@@ -786,6 +785,9 @@ public void run() { | |||
LOG.error("I/O exception running periodic check", ioe); | |||
} catch (ReplicationException.UnavailableException ue) { | |||
LOG.error("Underreplication manager unavailable running periodic check", ue); | |||
} finally { | |||
LOG.info("Completed checkAllLedgers in {} milliSeconds", checkAllLedgersDuration); | |||
checkAllLedgersTime.registerSuccessfulEvent(checkAllLedgersDuration, TimeUnit.MILLISECONDS); |
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.
we need to differentiate the if operation completed successfully or not
if an exception occurs we have to call registerFailedEvent
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.
OK I will fix
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.
I have fixed! Please review again,thanks! @nicoloboschi
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.
@nicoloboschi PTAL,thanks!
rerun failure checks |
1 similar comment
rerun failure checks |
ping |
@zymap @hangc0276 PTAL,thanks! |
ping |
@eolivelli PTAL,thanks! |
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
(cherry picked from commit dc2be02)
(cherry picked from commit dc2be02)
Motivation
When the checkallledgers method is executed periodically, if an exception is thrown,
time checkAllLedgers statistics status has not been updated.
Changes
So we should update it in finally:
finally {
if (!checkSuccess) {
long checkAllLedgersDuration = stopwatch.stop().elapsed(TimeUnit.MILLISECONDS);
checkAllLedgersTime.registerFailedEvent(checkAllLedgersDuration, TimeUnit.MILLISECONDS);
}
}