commit | 61a7bd6e86078041037bd2cca87e3f28d82f4efa | [log] [tgz] |
---|---|---|
author | 4onni <chinababy.sino@gmail.com> | Thu Sep 24 15:03:59 2020 +0800 |
committer | Jia Zhai <zhaijia@apache.org> | Thu Sep 24 16:05:26 2020 +0800 |
tree | 7db6cd31d2c828b0de20170d87d7c4c6fb2485b2 | |
parent | 41d1d6ecb9b03c1cecadd9222b82d3f197e4c9b6 [diff] |
[Issue 8093]Fix client lookup hangs when broker restarts (#8101) Fixes #8093 Client hangs forever when all brokers stop and then restart. There are several steps need to be finished before the broker can be fully started, as illustrated in the pseudo code below: ``` PulsarService#start(): broker.start(); // Step 1 webService.start(); // Step 2 leaderElectionService.start(); //Step 3 ``` If a lookup request gets in between Step 2 and Step 3, a NPE would be thrown, which will block all other coming requests from getting processed properly. Client can only connect to the broker after the election service started successfully This change added tests and can be verified as follows: - * Added 2 test cases under `LeaderElectionServiceTest` (cherry picked from commit 65cf9c095ea20c0a546e77458274848094131163)
Pulsar is a distributed pub-sub messaging platform with a very flexible messaging model and an intuitive client API.
Learn more about Pulsar at https://pulsar.apache.org
Requirements:
Compile and install:
$ mvn install -DskipTests
Run Unit Tests:
$ mvn test
Run Individual Unit Test:
$ cd module-name (e.g: pulsar-client) $ mvn test -Dtest=unit-test-name (e.g: ConsumerBuilderImplTest)
Start standalone Pulsar service:
$ bin/pulsar standalone
Check https://pulsar.apache.org for documentation and examples.
Apache Pulsar is using lombok so you have to ensure your IDE setup with required plugins.
To configure annotation processing in IntelliJ:
Open Annotation Processors Settings dialog box by going to Settings -> Build, Execution, Deployment -> Compiler -> Annotation Processors
.
Select the following buttons:
Set the generated source directories to be equal to the Maven directories:
Click “OK”.
Install the lombok plugin in intellij.
Follow the instructions here to configure your Eclipse setup.
Refer to the docs README.
Name | Scope | |||
---|---|---|---|---|
users@pulsar.apache.org | User-related discussions | Subscribe | Unsubscribe | Archives |
dev@pulsar.apache.org | Development-related discussions | Subscribe | Unsubscribe | Archives |
Pulsar slack channel at https://apache-pulsar.slack.com/
You can self-register at https://apache-pulsar.herokuapp.com/
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See http://www.wassenaar.org/ for more information.
The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this Apache Software Foundation distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.
The following provides more details on the included cryptographic software: Pulsar uses the SSL library from Bouncy Castle written by http://www.bouncycastle.org.