You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "hangc0276 (via GitHub)" <gi...@apache.org> on 2023/08/28 16:18:49 UTC

[GitHub] [bookkeeper] hangc0276 opened a new pull request, #4062: Entry read support local node rack awareness

hangc0276 opened a new pull request, #4062:
URL: https://github.com/apache/bookkeeper/pull/4062

   ### Motivation
   - The entry write supports the local node Rack-Aware placement policy but does not support the local node Region-Aware placement policy
   - The entry read supports the local node Region-Aware placement policy but does not support the local node Rack-Aware placement policy
   
   In order to match the local node region/rack awareness both on entry write and read, we need to support the following feature
   - Entry write supports local node region awareness placement policy
   - Entry read supports local node rack awareness placement policy
   
   ### Modification
   The PR aims to support entry read local node awareness placement policy.


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


[GitHub] [bookkeeper] horizonzy commented on a diff in pull request #4062: Entry read support local node rack awareness

Posted by "horizonzy (via GitHub)" <gi...@apache.org>.
horizonzy commented on code in PR #4062:
URL: https://github.com/apache/bookkeeper/pull/4062#discussion_r1309864564


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/RackawareEnsemblePlacementPolicyImpl.java:
##########
@@ -1318,4 +1322,11 @@ private BookieNode replaceToAdherePlacementPolicyInternal(
         }
         throw new BKNotEnoughBookiesException();
     }
+
+    protected String getLocalRack(BookieNode node) {
+        if (null == node || null == node.getAddr()) {
+            return UNKNOWN_RACK;
+        }
+        return node.getNetworkLocation();

Review Comment:
   If the network location is `/default-rack`, shall we think of it as UNKNOWN_RACK?



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