You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by gi...@git.apache.org on 2017/08/30 01:14:31 UTC

[GitHub] rdhabalia opened a new pull request #726: Handle NPE at load-manager when leader couldn't find available broker

rdhabalia opened a new pull request #726: Handle NPE at load-manager when leader couldn't find available broker
URL: https://github.com/apache/incubator-pulsar/pull/726
 
 
   ### Motivation
   
   - Broker lookup gives NPE when it couldn't find any available broker and it should be handle with correct error-msg.
   ```
   pulsar-256-8] WARN org.apache.pulsar.broker.namespace.NamespaceService - Error when searching for candidate broker to acquire my-property/use/con-ns1/0x00000000_0xffffffff: null
   java.lang.NullPointerException
       at org.apache.pulsar.broker.namespace.NamespaceService.getLeastLoadedFromLoadManager(NamespaceService.java:456)
       at org.apache.pulsar.broker.namespace.NamespaceService.searchForCandidateBroker(NamespaceService.java:336)
       at org.apache.pulsar.broker.namespace.NamespaceService.lambda$14(NamespaceService.java:299)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
       at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
       at java.lang.Thread.run(Thread.java:745)
   ```
   
   - also [SimpleLoadManager](https://github.com/apache/incubator-pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/SimpleLoadManagerImpl.java#L974) is not logging list of available broker because of missing `toString()` into `SimpleResourceUnit`
   
   
   ### Modifications
   
   handle NPE when lookup doesn't find available broker.
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services