apache / pulsar

Apache Pulsar - distributed pub-sub messaging system
https://pulsar.apache.org/
Apache License 2.0
14.15k stars 3.57k forks source link

[fix][broker] Fix brokerId npe problem #22976

Closed TakaHiR07 closed 3 months ago

TakaHiR07 commented 3 months ago

Motivation

As shown in https://github.com/apache/pulsar/issues/22975.

Modifications

generate brokerId when construct PulsarService, instead of in PulsarService.start().

Verifying this change

Documentation

Matching PR in forked repository

PR in forked repository:

lhotari commented 3 months ago

I'll propose another PR which also makes an improvement to ensure that the broker doesn't start serving requests before it has been fully started. That will also prevent other edge cases.

lhotari commented 3 months ago

@TakaHiR07 I have created #22977 which addresses the brokerId NPE problem.

TakaHiR07 commented 3 months ago

I'll propose another PR which also makes an improvement to ensure that the broker doesn't start serving requests before it has been fully started. That will also prevent other edge cases.

Ok