You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "horizonzy (via GitHub)" <gi...@apache.org> on 2023/09/01 02:59:20 UTC

[GitHub] [bookkeeper] horizonzy commented on a diff in pull request #4063: Entry write support local node region aware placement policy

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


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/RegionAwareEnsemblePlacementPolicy.java:
##########
@@ -388,9 +388,20 @@ public PlacementResult<List<BookieId>> newEnsemble(int ensembleSize, int writeQu
                 remainingEnsembleBeforeIteration = remainingEnsemble;
                 int regionsToAllocate = numRemainingRegions;
                 int startRegionIndex = lastRegionIndex % numRegionsAvailable;
+                int localRegionIndex = -1;

Review Comment:
   Maybe not. If so, the `localRegion` node can't pick again. If we want to pick 5 nodes, and there are only two regions. If we remove `localRegion`, then we can only pick nodes from the remaining one region.



-- 
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: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org