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:
   This will make other brokers to wait for the Own event. I think whatever 
ongoing state change should follow the protocol without interruption.
   
   I think better place to check this "disablePubOwnedEvent" state are 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