hangc0276 commented on code in PR #3779:
URL: https://github.com/apache/bookkeeper/pull/3779#discussion_r1111685000
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/RackawareEnsemblePlacementPolicyImpl.java:
##########
@@ -544,6 +545,10 @@ public BookieNode selectFromNetworkLocation(String
networkLoc,
* the whole cluster and exclude the racks specified at
* <tt>excludeRacks</tt>.
*/
+ LOG.warn("Failed to choose a bookie node from network location {},
"
Review Comment:
Yes, it still can choose from rack 4. But if we only have 3 racks (rack1,
rack2, and rack3), and we failed to choose any bookie nodes from rack1, it will
randomly choose one from rack2 or rack3, which will lead to 3 replicas located
on 2 racks.
IMO, we'd better use the `WARN` level, because it will choose one bookie
node from the whole bookie cluster randomly and it has the risk of the chosen
bookie being located on the same rack with existing replicas.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]