horizonzy commented on code in PR #2931:
URL: https://github.com/apache/bookkeeper/pull/2931#discussion_r937768730


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/RackawareEnsemblePlacementPolicy.java:
##########
@@ -236,6 +236,28 @@ public BookieNode selectFromNetworkLocation(
         }
     }
 
+    @Override
+    public PlacementResult<List<BookieId>> replaceToAdherePlacementPolicy(

Review Comment:
   In some case, the replace policy will replace more bookie. There are two 
racks.(rack1, rack2). 
   rack1: bookie1,bookie2,bookie3,bookie4
   rack2: bookie5,bookie6,bookie7,bookie8
   `E:6 WQ:2 AQ:2`. The ensemble is (5,6,1,7,2,8). 
(rack2,rack2,rack1,rack2,rack1,rack2), only replace the first  bookie5 to 
bookie3, it adhere the placement policy. But now the implements didn't replace 
the firstly, it will replace from second element(bookie6), it will replace more 
bookie.



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

Reply via email to