eolivelli commented on a change in pull request #1683: Enhance Auditor
URL: https://github.com/apache/bookkeeper/pull/1683#discussion_r220711745
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/ZkLedgerUnderreplicationManager.java
##########
@@ -884,4 +887,50 @@ public String
getReplicationWorkerIdRereplicatingLedger(long ledgerId)
}
return replicationWorkerId;
}
+
+ @Override
+ public void setCheckAllLedgersCTime(long checkAllLedgersCTime) throws
UnavailableException {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("setCheckAllLedgersCTime");
+ }
+ try {
+ CheckAllLedgersFormat.Builder builder =
CheckAllLedgersFormat.newBuilder();
+ builder.setCheckAllLedgersCTime(checkAllLedgersCTime);
+ byte[] checkAllLedgersFormatByteArray =
builder.build().toByteArray();
+ if (zkc.exists(checkAllLedgersCtimeZnode, false) != null) {
+ zkc.setData(checkAllLedgersCtimeZnode,
checkAllLedgersFormatByteArray, -1);
+ } else {
+ zkc.create(checkAllLedgersCtimeZnode,
checkAllLedgersFormatByteArray, Ids.OPEN_ACL_UNSAFE,
Review comment:
One last note: we should apply ZK ACLs according to server configuration
----------------------------------------------------------------
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