jvrao commented on a change in pull request #1683: Enhance Auditor
URL: https://github.com/apache/bookkeeper/pull/1683#discussion_r219398315
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java
##########
@@ -661,6 +693,11 @@ void checkAllLedgers() throws BKException, IOException,
InterruptedException, Ke
}
}, null, BKException.Code.OK, BKException.Code.ReadException);
FutureUtils.result(processFuture, BKException.HANDLER);
+ try {
+
ledgerUnderreplicationManager.setCheckAllLedgersCTime(System.currentTimeMillis());
+ } catch (UnavailableException ue) {
+ LOG.error("Got exception while trying to set
checkAllLedgersCTime", ue);
Review comment:
Since there is a potential to fail this, why not cache this value. and the
auditor reads the zk only if the local/cached value is -1. A minor optimization
and also saves us from this kind of errors.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services