merlimat opened a new pull request #2935: Ensure broker is fully boostrapped before load manager register itself URL: https://github.com/apache/pulsar/pull/2935 ### Motivation In some cases the broker can immediately gets assigned traffic before it's fully boostrapped. This happens because the load manager is registering the broker in ZK before some of the initialization steps are completed. This results in NPE, like : ``` Caused by: java.lang.NullPointerException at org.apache.pulsar.broker.service.persistent.PersistentTopic.hasSchema(PersistentTopic.java:1815) ~[org.apache.pulsar-pulsar-broker-2.2.0-streamlio-22.jar:2.2.0-streamlio-22] at org.apache.pulsar.broker.service.ServerCnx.lambda$25(ServerCnx.java:836) ~[org.apache.pulsar-pulsar-broker-2.2.0-streamlio-22.jar:2.2.0-streamlio-22] at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:656) ~[?:1.8.0_181] ``` ### Modifications * Register the broker in ZK only after the full start sequence has been done. This will ensure other brokers will not discover this broker before it's ready. * Expose the "is ready" state in the VipStatus -- This will be used to make sure the load balancer will not direct any lookup request to the broker before it's ready.
---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services