reddycharan commented on a change in pull request #1902: (WIP) Metadata checker 
validating EnsemblePlacementpolicy
URL: https://github.com/apache/bookkeeper/pull/1902#discussion_r248762619
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java
 ##########
 @@ -803,8 +885,72 @@ void checkAllLedgers() throws BKException, IOException, 
InterruptedException, Ke
                 LOG.error("Got exception while trying to set 
checkAllLedgersCTime", ue);
             }
         } finally {
-            admin.close();
-            client.close();
+            localAdmin.close();
+            localClient.close();
+        }
+    }
+
+    void metadataCheck() throws BKAuditException {
+        final CountDownLatch metadataCheckLatch = new CountDownLatch(1);
+        Processor<Long> ledgerProcessor = new Processor<Long>() {
+            @Override
+            public void process(Long ledgerId, AsyncCallback.VoidCallback 
iterCallback) {
+                
ledgerManager.readLedgerMetadata(ledgerId).whenComplete((metadataVer, 
exception) -> {
+                    if (exception == null) {
+                        LedgerMetadata metadata = metadataVer.getValue();
+                        int writeQuorumSize = metadata.getWriteQuorumSize();
+                        int ackQuorumSize = metadata.getAckQuorumSize();
+                        if (metadata.isClosed()) {
 
 Review comment:
   ok will change comment to 'closed ledgers'

----------------------------------------------------------------
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

Reply via email to