forked from apache/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Broker] Fix NPE when subscription is already removed (apache#14363)
* [Broker] Fix NPE when subscription is already removed * Cover same case for NonPersistentTopic Master Issue: apache#14362 ### Motivation There is current a race condition when we remove a subscription. The race and how to reproduce it is described in the apache#14362. One of the consequences of the race is that there is a chance we try to remove the subscription from the topic twice. This leads to an NPE, as described in the issue. ### Modifications * Verify that the `sub` is not null before getting its stats. ### Verifying this change This is a trivial change. (cherry picked from commit aee1e7d)
- Loading branch information
1 parent
766e5fe
commit 2318a18
Showing
2 changed files
with
12 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters