sijie opened a new pull request #5067: [bookkeeper] Don't return DEFAULT_RACK 
if ZkBookieRackAffinityMapping can't resolve network location
URL: https://github.com/apache/pulsar/pull/5067
 
 
   
   
   <!--
   ### Contribution Checklist
     
     - Name the pull request in the form "[Issue XYZ][component] Title of the 
pull request", where *XYZ* should be replaced by the actual issue number.
       Skip *Issue XYZ* if there is no associated github issue for this pull 
request.
       Skip *component* if you are unsure about which is the best component. 
E.g. `[docs] Fix typo in produce method`.
   
     - Fill out the template below to describe the changes contributed by the 
pull request. That will give reviewers the context they need to do the review.
     
     - Each pull request should address only one issue, not mix up code from 
multiple issues.
     
     - Each commit in the pull request has a meaningful commit message
   
     - Once all items of the checklist are addressed, remove the above text and 
this checklist, leaving only the filled out template below.
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   
   *Motivation*
   
   Different placement policy has different default rack information. For 
example, the default rack for `RackAware`
   is `/default-rack` and the default rack for `RegionAware` is 
`/default-region/default-rack`. If we return the
   wrong default rack, it can potentially cause inconsistent network locations 
inserted to the network topology and
   causing the following errors.
   
   ```
   15:36:30.083 [BookKeeperClientScheduler-OrderedScheduler-0-0] ERROR 
org.apache.bookkeeper.net.NetworkTopologyImpl - Error: can't add leaf node 
<Bookie:1.1.1.2:3181> at depth 2 to topology:
   Number of racks: 1
   Expected number of leaves:1
   /sh/rack1/1.1.1.1:3181
   
   15:36:30.083 [BookKeeperClientScheduler-OrderedScheduler-0-0] ERROR 
org.apache.bookkeeper.client.RackawareEnsemblePlacementPolicyImpl - Unexpected 
exception while handling joining bookie 1.1.1.2:3181
   org.apache.bookkeeper.net.NetworkTopologyImpl$InvalidTopologyException: 
Invalid network topology. You cannot have a rack and a non-rack node at the 
same level of the network topology.
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to