You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/08/07 17:34:49 UTC

[GitHub] sijie commented on a change in pull request #1586: Get currentEnsemble from ledger rather than directly from metadata

sijie commented on a change in pull request #1586: Get currentEnsemble from ledger rather than directly from metadata
URL: https://github.com/apache/bookkeeper/pull/1586#discussion_r208318378
 
 

 ##########
 File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
 ##########
 @@ -1215,7 +1215,7 @@ private boolean isWritesetWritable(DistributionSchedule.WriteSet writeSet,
 
         int nonWritableCount = 0;
         for (int i = 0; i < sz; i++) {
-            if (!bk.getBookieClient().isWritable(getLedgerMetadata().currentEnsemble.get(i), key)) {
+            if (!bk.getBookieClient().isWritable(getCurrentEnsemble().get(i), key)) {
 
 Review comment:
   I am also in favor of saving the ensemble to a variable before starting the loop. However I think the logic here needs to be revisited, just to make sure ensemble changes won't impact the logic here.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services