lhotari opened a new pull request, #23302:
URL: https://github.com/apache/pulsar/pull/23302

   cherry picked from commit fc60ec06ae98fa4000473a636bfb06729c210048
   
   ### Motivation
   
   backporting PR #23297 to branch-3.0
   
   ### Other context
   
   There are some test failures and problems that show up when running 
LoadManagerFailFastTest
   Could someone take over this PR who understands the problems?
   
   in LoadManagerFailFastTest.testServiceUnitStateChannelFailure, there's an 
continue loop of "Failed to get the channel owner" exceptions:
   ```
   2024-09-13T07:23:58,402 - WARN  - 
[pulsar-load-manager-67-1:ExtensibleLoadManagerImpl] - The 
broker:localhost:56523 failed to set the role. Retrying 10 th ...
   java.lang.RuntimeException: Failed to get the channel owner.
        at 
org.apache.pulsar.broker.loadbalance.extensions.channel.ServiceUnitStateChannelImpl.isChannelOwner(ServiceUnitStateChannelImpl.java:467)
 ~[classes/:?]
        at 
org.apache.pulsar.broker.loadbalance.extensions.ExtensibleLoadManagerImpl.playLeader(ExtensibleLoadManagerImpl.java:793)
 ~[classes/:?]
        at 
org.apache.pulsar.broker.loadbalance.extensions.ExtensibleLoadManagerImpl.lambda$start$11(ExtensibleLoadManagerImpl.java:334)
 ~[classes/:?]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
 ~[?:?]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) 
~[?:?]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) 
~[?:?]
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
 ~[netty-common-4.1.113.Final.jar:4.1.113.Final]
        at java.lang.Thread.run(Thread.java:840) ~[?:?]
   Caused by: java.util.concurrent.ExecutionException: 
java.lang.IllegalStateException: Invalid channel state:Closed
        at 
java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) 
~[?:?]
        at 
java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096) ~[?:?]
        at 
org.apache.pulsar.broker.loadbalance.extensions.channel.ServiceUnitStateChannelImpl.isChannelOwner(ServiceUnitStateChannelImpl.java:462)
 ~[classes/:?]
        ... 9 more
   Caused by: java.lang.IllegalStateException: Invalid channel state:Closed
        at 
org.apache.pulsar.broker.loadbalance.extensions.channel.ServiceUnitStateChannelImpl.getChannelOwnerAsync(ServiceUnitStateChannelImpl.java:441)
 ~[classes/:?]
        at 
org.apache.pulsar.broker.loadbalance.extensions.channel.ServiceUnitStateChannelImpl.isChannelOwnerAsync(ServiceUnitStateChannelImpl.java:449)
 ~[classes/:?]
        at 
org.apache.pulsar.broker.loadbalance.extensions.channel.ServiceUnitStateChannelImpl.isChannelOwner(ServiceUnitStateChannelImpl.java:462)
 ~[classes/:?]
        ... 9 more
   2024-09-13T07:23:58,503 - ERROR - 
[pulsar-load-manager-67-1:ServiceUnitStateChannelImpl] - Failed to get the 
channel owner.
   java.util.concurrent.ExecutionException: java.lang.IllegalStateException: 
Invalid channel state:Closed
        at 
java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) 
~[?:?]
        at 
java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096) ~[?:?]
        at 
org.apache.pulsar.broker.loadbalance.extensions.channel.ServiceUnitStateChannelImpl.isChannelOwner(ServiceUnitStateChannelImpl.java:462)
 ~[classes/:?]
        at 
org.apache.pulsar.broker.loadbalance.extensions.ExtensibleLoadManagerImpl.playLeader(ExtensibleLoadManagerImpl.java:793)
 ~[classes/:?]
        at 
org.apache.pulsar.broker.loadbalance.extensions.ExtensibleLoadManagerImpl.lambda$start$11(ExtensibleLoadManagerImpl.java:334)
 ~[classes/:?]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
 ~[?:?]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) 
~[?:?]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) 
~[?:?]
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
 ~[netty-common-4.1.113.Final.jar:4.1.113.Final]
        at java.lang.Thread.run(Thread.java:840) ~[?:?]
   Caused by: java.lang.IllegalStateException: Invalid channel state:Closed
        at 
org.apache.pulsar.broker.loadbalance.extensions.channel.ServiceUnitStateChannelImpl.getChannelOwnerAsync(ServiceUnitStateChannelImpl.java:441)
 ~[classes/:?]
        at 
org.apache.pulsar.broker.loadbalance.extensions.channel.ServiceUnitStateChannelImpl.isChannelOwnerAsync(ServiceUnitStateChannelImpl.java:449)
 ~[classes/:?]
        ... 10 more
   ```
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->


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