lifepuzzlefun commented on code in PR #20315:
URL: https://github.com/apache/pulsar/pull/20315#discussion_r1192907177
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManagerImpl.java:
##########
@@ -380,12 +380,22 @@ public CompletableFuture<Optional<BrokerLookupData>>
assign(Optional<ServiceUnit
}
public CompletableFuture<Optional<String>> selectAsync(ServiceUnitId
bundle) {
+ return selectAsync(bundle, Optional.empty());
+ }
+
+ public CompletableFuture<Optional<String>> selectAsync(ServiceUnitId
bundle,
+
Optional<Set<String>> excludeBrokerSet) {
Review Comment:
maybe we can just use empty set like `Collections.emptySet()` to replace
`Optional`
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManagerImpl.java:
##########
@@ -685,4 +695,10 @@ private void monitor() {
log.error("Failed to get the channel ownership.", e);
}
}
+
+ public void disableBroker() throws Exception {
+ serviceUnitStateChannel.cleanOwnerships();
+ leaderElectionService.close();
Review Comment:
I think we need keep the leaderElectionService open.
--
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]