heesung-sn commented on code in PR #23349:
URL: https://github.com/apache/pulsar/pull/23349#discussion_r1775968086


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/channel/ServiceUnitStateChannelImpl.java:
##########
@@ -1381,8 +1400,10 @@ private void overrideOwnership(String serviceUnit, 
ServiceUnitStateData orphanDa
 
     private void waitForCleanups(String broker, boolean excludeSystemTopics, 
int maxWaitTimeInMillis) {
         long started = System.currentTimeMillis();

Review Comment:
   I think we can skip this waiting logic if the broker to cleanup is the last 
broker. 
   
   I think this waiting logic is optional, and the intention is to give some 
time to the cluster to converge cleaned ownership view before the next cleanup, 
if ever. 
   
   However, because of the nature of the current ownership changes, there might 
be a chance that the ownership view might not converge within the timeout -- 
eventually the leader should fix any orphan or too long inflight states, 
though).
   
   If there is no broker waiting, we can just skip this waiting.



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