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

fix checkAllLedgersDuration compute #2970

Merged
merged 2 commits into from
Feb 23, 2022

Conversation

lordcheng10
Copy link
Contributor

@lordcheng10 lordcheng10 commented Jan 2, 2022

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);
}
}

@lordcheng10
Copy link
Contributor Author

rerun failure checks

16 similar comments
@lordcheng10
Copy link
Contributor Author

rerun failure checks

@lordcheng10
Copy link
Contributor Author

rerun failure checks

@lordcheng10
Copy link
Contributor Author

rerun failure checks

@lordcheng10
Copy link
Contributor Author

rerun failure checks

@lordcheng10
Copy link
Contributor Author

rerun failure checks

@lordcheng10
Copy link
Contributor Author

rerun failure checks

@lordcheng10
Copy link
Contributor Author

rerun failure checks

@lordcheng10
Copy link
Contributor Author

rerun failure checks

@lordcheng10
Copy link
Contributor Author

rerun failure checks

@lordcheng10
Copy link
Contributor Author

rerun failure checks

@lordcheng10
Copy link
Contributor Author

rerun failure checks

@lordcheng10
Copy link
Contributor Author

rerun failure checks

@lordcheng10
Copy link
Contributor Author

rerun failure checks

@lordcheng10
Copy link
Contributor Author

rerun failure checks

@lordcheng10
Copy link
Contributor Author

rerun failure checks

@lordcheng10
Copy link
Contributor Author

rerun failure checks

@lordcheng10
Copy link
Contributor Author

ping

@lordcheng10
Copy link
Contributor Author

@dlg99 PTAL,thanks!

@lordcheng10
Copy link
Contributor Author

ping

1 similar comment
@lordcheng10
Copy link
Contributor Author

ping

@lordcheng10
Copy link
Contributor Author

ping.
can someone please review the PR?

@lordcheng10
Copy link
Contributor Author

@pkumar-singh PTAL,thanks!

@lordcheng10
Copy link
Contributor Author

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);
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK I will fix

Copy link
Contributor Author

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nicoloboschi PTAL,thanks!

@lordcheng10
Copy link
Contributor Author

rerun failure checks

1 similar comment
@lordcheng10
Copy link
Contributor Author

rerun failure checks

@lordcheng10
Copy link
Contributor Author

ping

@lordcheng10
Copy link
Contributor Author

lordcheng10 commented Feb 20, 2022

@zymap @hangc0276 PTAL,thanks!

@lordcheng10
Copy link
Contributor Author

ping

@lordcheng10
Copy link
Contributor Author

@eolivelli PTAL,thanks!

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

Lgtm

@eolivelli eolivelli merged commit dc2be02 into apache:master Feb 23, 2022
@hangc0276 hangc0276 self-assigned this Nov 5, 2022
hangc0276 pushed a commit to hangc0276/bookkeeper that referenced this pull request Nov 5, 2022
hangc0276 pushed a commit to hangc0276/bookkeeper that referenced this pull request Nov 7, 2022
nicoloboschi pushed a commit to datastax/bookkeeper that referenced this pull request Jan 11, 2023
(cherry picked from commit dc2be02)
(cherry picked from commit cbaf9f8)
Ghatage pushed a commit to sijie/bookkeeper that referenced this pull request Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants