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_r188794373
##########
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:
removed 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:
[email protected]
With regards,
Apache Git Services