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


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/channel/ServiceUnitStateChannelImpl.java:
##########
@@ -815,6 +819,15 @@ private void handleOwnEvent(String serviceUnit, 
ServiceUnitStateData data) {
 
     private void handleAssignEvent(String serviceUnit, ServiceUnitStateData 
data) {
         if (isTargetBroker(data.dstBroker())) {
+            if (disablePubOwnedEvent) {
+                log.info("Skip assigning self({}) as the owner after 
cleanOwnerships", serviceUnit);
+                final var getOwnerRequest = 
getOwnerRequests.remove(serviceUnit);

Review Comment:
   Plz note that this will make other brokers wait for the Own event. Until the 
leader cleans up the inflight bundles, deferred lookups on other brokers on 
this bundle will be blocked.
   
   I think we can check this "disablePubOwnedEvent" state in the following 
functions, before publishing the state change events.
   
   - publishAssignEventAsync
   - publishOverrideEventAsync
   - publishUnloadEventAsync
   - publishSplitEventAsync
   
   We already have `validateChannelState` func to check the channel state, and 
I think we can additionally consider "disablePubOwnedEvent" state there.
   
   



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