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/05/08 19:28:47 UTC

[GitHub] reddycharan commented on a change in pull request #1397: Bookies should be from different racks in a Writequorum.

reddycharan commented on a change in pull request #1397: Bookies should be from different racks in a Writequorum.
URL: https://github.com/apache/bookkeeper/pull/1397#discussion_r186840926
 
 

 ##########
 File path: bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestRackawareEnsemblePlacementPolicy.java
 ##########
 @@ -886,11 +973,29 @@ static int getNumCoveredWriteQuorums(ArrayList<BookieSocketAddress> ensemble, in
                 BookieSocketAddress addr = ensemble.get(bookieIdx);
                 racks.add(StaticDNSResolver.getRack(addr.getHostName()));
             }
-            numCoveredWriteQuorums += (racks.size() > 1 ? 1 : 0);
+            numCoveredWriteQuorums += (racks.size() == Math.min(writeQuorumSize, Math.max(availableNumOfRacks, 2)) ? 1
+                    : 0);
         }
         return numCoveredWriteQuorums;
     }
 
+    static int getMinNumOfRacksForAWriteQuorum(ArrayList<BookieSocketAddress> ensemble, int writeQuorumSize)
 
 Review comment:
   have to remove this method

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