Demogorgon314 commented on code in PR #20822:
URL: https://github.com/apache/pulsar/pull/20822#discussion_r1267725085
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java:
##########
@@ -659,12 +660,25 @@ public synchronized void doLoadShedding() {
if (!shouldAntiAffinityNamespaceUnload(namespaceName,
bundleRange, broker)) {
return;
}
+ NamespaceBundle bundleToUnload =
LoadManagerShared.getNamespaceBundle(pulsar, bundle);
+ Optional<String> destBroker =
this.selectBroker(bundleToUnload);
+ if (!destBroker.isPresent()) {
Review Comment:
I see the branch-2.10 is required Java [JDK
11](https://adoptium.net/?variant=openjdk11) or [JDK
8](https://adoptium.net/?variant=openjdk8), so I’m using the `isPresent `
method here.
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java:
##########
@@ -659,12 +660,25 @@ public synchronized void doLoadShedding() {
if (!shouldAntiAffinityNamespaceUnload(namespaceName,
bundleRange, broker)) {
return;
}
+ NamespaceBundle bundleToUnload =
LoadManagerShared.getNamespaceBundle(pulsar, bundle);
+ Optional<String> destBroker =
this.selectBroker(bundleToUnload);
+ if (!destBroker.isPresent()) {
Review Comment:
I see the branch-2.10 is required Java [JDK
11](https://adoptium.net/?variant=openjdk11) or [JDK
8](https://adoptium.net/?variant=openjdk8), so I’m using the `isPresent `
method here.
--
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]