Technoboy- commented on issue #20871:
URL: https://github.com/apache/pulsar/issues/20871#issuecomment-1667087905

   > > > > Would you like to try to fix this?
   > > > 
   > > > 
   > > > I'd like to help. Here are my thoughts
   > > > change the following code
   > > > 
https://github.com/apache/pulsar/blob/69298da9f8bd009b72eb5533d31c8c7a696b2a63/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/Bookies.java#L108-L121
   > > > 
   > > > like this
   > > > ```java
   > > >                     if (bi.isPresent()) {
   > > >                         asyncResponse.resume(bi.get());
   > > >                     } else {
   > > >                         Set<BookieId> bookieIds = getAllBookieIds();
   > > >                         if 
(bookieIds.contains(BookieId.parse(bookieAddress))) {
   > > >                             asyncResponse.resume((BookieInfo) null);
   > > >                         } else {
   > > >                             asyncResponse.resume(new 
RestException(Status.NOT_FOUND,
   > > >                                     "Bookie address not found: " + 
bookieAddress));
   > > >                         }
   > > >                     }
   > > > ```
   > > > 
   > > > 
   > > >     
   > > >       
   > > >     
   > > > 
   > > >       
   > > >     
   > > > 
   > > >     
   > > >   
   > > > The `getAllBookieIds()` method can be implemented by referring to the 
following methods
   > > > 
https://github.com/apache/pulsar/blob/69298da9f8bd009b72eb5533d31c8c7a696b2a63/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/Bookies.java#L78-L97
   > > > 
   > > > I think `delete-bookie-rack` api has the same issue
   > > > @Technoboy-
   > > 
   > > 
   > > Ah, how about simplifying and changing the promote message more clear ?
   > 
   > could you explain more clearly?
   
   Like fixing the promote message "Bookie rack mapping info not found"


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