Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix][broker] Fix NPE when updating topic properties #17352

Merged
merged 3 commits into from
Aug 31, 2022

Conversation

Flowermin
Copy link
Contributor

@Flowermin Flowermin commented Aug 30, 2022

Motivation

The NPE occurs if p.properties is null when updating topic's properties in #17238 .

Documentation

  • doc-not-needed

@yuruguo yuruguo added this to the 2.12.0 milestone Aug 30, 2022
@HQebupt
Copy link
Contributor

HQebupt commented Aug 30, 2022

Please follow Pulsar Pull Request Naming Convention Guide: https://docs.google.com/document/d/1d8Pw6ZbWk-_pCKdOmdvx9rnhPiyuxwq60_TrD68d7BA/edit#heading=h.wu6ygjne8e35

@Flowermin Flowermin changed the title fix NPE to update topic properties [fix][broker] Fix NPE when updating topic properties Aug 30, 2022
@Flowermin
Copy link
Contributor Author

Please follow Pulsar Pull Request Naming Convention Guide: https://docs.google.com/document/d/1d8Pw6ZbWk-_pCKdOmdvx9rnhPiyuxwq60_TrD68d7BA/edit#heading=h.wu6ygjne8e35

Done

Copy link
Contributor

@yuruguo yuruguo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AnonHxy AnonHxy added type/bug The PR fixed a bug or issue reported a bug release/2.10.2 labels Aug 31, 2022
@yuruguo yuruguo merged commit f1d1158 into apache:master Aug 31, 2022
@Jason918
Copy link
Contributor

Jason918 commented Sep 4, 2022

Can you help open a new PR to branch-2.10? There are a lot conflict when cherry-pick directly. @Flowermin

@AnonHxy
Copy link
Contributor

AnonHxy commented Sep 4, 2022

It' a fix for this PR #17238 (comment), we should also remove the label @Jason918

liangyepianzhou pushed a commit to streamnative/pulsar-archived that referenced this pull request Apr 28, 2023
liangyepianzhou pushed a commit to streamnative/pulsar-archived that referenced this pull request May 10, 2023
liangyepianzhou added a commit to streamnative/pulsar-archived that referenced this pull request Sep 27, 2023
* [broker][admin]Add api for update topic properties (apache#17238)

(cherry picked from commit b21f728)

* [broker][admin] Add cmd to remove topic properties (apache#17337)

* [broker][admin] Add cmd to remove topic properties

* address comment

* address comment

(cherry picked from commit 7075a5c)
(cherry picked from commit 6f8dbc7)

* [fix][broker] Fix NPE when updating topic's properties (apache#17352)

Co-authored-by: bjhuxiaohua <[email protected]>
(cherry picked from commit f1d1158)
(cherry picked from commit 723ad75)

* [fix][broker] Fix NPE when update topic properties.
### Motivation

In Pulsar 2.10, when creating a producer/consumer that auto-creates a topic and then attempts to update its properties, a NullPointerException (NPE) occurs. The reason is that Pulsar 2.10 does not correctly handle the case when the properties are `null`.
### Modifications

Add an NPE check.

(cherry picked from commit 0b02321)

* remove release profile

* import

* Revert "remove release profile"

This reverts commit 6bec650.

---------

Co-authored-by: Xiaoyu Hou <[email protected]>
Co-authored-by: Ruguo Yu <[email protected]>
Co-authored-by: Flowermin <[email protected]>
liangyepianzhou added a commit to streamnative/pulsar-archived that referenced this pull request Sep 27, 2023
* [broker][admin]Add api for update topic properties (apache#17238)

(cherry picked from commit b21f728)

* [broker][admin] Add cmd to remove topic properties (apache#17337)

* [broker][admin] Add cmd to remove topic properties

* address comment

* address comment

(cherry picked from commit 7075a5c)
(cherry picked from commit 6f8dbc7)

* [fix][broker] Fix NPE when updating topic's properties (apache#17352)

Co-authored-by: bjhuxiaohua <[email protected]>
(cherry picked from commit f1d1158)
(cherry picked from commit 723ad75)

* [fix][broker] Fix NPE when update topic properties.
### Motivation

In Pulsar 2.10, when creating a producer/consumer that auto-creates a topic and then attempts to update its properties, a NullPointerException (NPE) occurs. The reason is that Pulsar 2.10 does not correctly handle the case when the properties are `null`.
### Modifications

Add an NPE check.

(cherry picked from commit 0b02321)

* remove release profile

* import

* Revert "remove release profile"

This reverts commit 6bec650.

---------

Co-authored-by: Xiaoyu Hou <[email protected]>
Co-authored-by: Ruguo Yu <[email protected]>
Co-authored-by: Flowermin <[email protected]>
nodece pushed a commit to nodece/pulsar that referenced this pull request Nov 27, 2023
nodece added a commit to ascentstream/pulsar that referenced this pull request Nov 27, 2023
* [broker][admin]Add api for update topic properties (apache#17238)

(cherry picked from commit b21f728)
Signed-off-by: Zixuan Liu <[email protected]>

* [broker][admin] Add cmd to remove topic properties (apache#17337)

* [broker][admin] Add cmd to remove topic properties

* address comment

* address comment

(cherry picked from commit 7075a5c)
Signed-off-by: Zixuan Liu <[email protected]>

* [fix][broker] Fix NPE when updating topic's properties (apache#17352)

Co-authored-by: bjhuxiaohua <[email protected]>
(cherry picked from commit f1d1158)

---------

Co-authored-by: Xiaoyu Hou <[email protected]>
Co-authored-by: Ruguo Yu <[email protected]>
Co-authored-by: Flowermin <[email protected]>
nodece added a commit to ascentstream/pulsar that referenced this pull request Mar 15, 2024
* [broker][admin]Add api for update topic properties (apache#17238)

(cherry picked from commit b21f728)
Signed-off-by: Zixuan Liu <[email protected]>

* [broker][admin] Add cmd to remove topic properties (apache#17337)

* [broker][admin] Add cmd to remove topic properties

* address comment

* address comment

(cherry picked from commit 7075a5c)
Signed-off-by: Zixuan Liu <[email protected]>

* [fix][broker] Fix NPE when updating topic's properties (apache#17352)

Co-authored-by: bjhuxiaohua <[email protected]>
(cherry picked from commit f1d1158)

---------

Co-authored-by: Xiaoyu Hou <[email protected]>
Co-authored-by: Ruguo Yu <[email protected]>
Co-authored-by: Flowermin <[email protected]>
nodece added a commit to ascentstream/pulsar that referenced this pull request Mar 15, 2024
* [broker][admin]Add api for update topic properties (apache#17238)

(cherry picked from commit b21f728)
Signed-off-by: Zixuan Liu <[email protected]>

* [broker][admin] Add cmd to remove topic properties (apache#17337)

* [broker][admin] Add cmd to remove topic properties

* address comment

* address comment

(cherry picked from commit 7075a5c)
Signed-off-by: Zixuan Liu <[email protected]>

* [fix][broker] Fix NPE when updating topic's properties (apache#17352)

Co-authored-by: bjhuxiaohua <[email protected]>
(cherry picked from commit f1d1158)

---------

Co-authored-by: Xiaoyu Hou <[email protected]>
Co-authored-by: Ruguo Yu <[email protected]>
Co-authored-by: Flowermin <[email protected]>
nodece added a commit to nodece/pulsar that referenced this pull request May 11, 2024
* [broker][admin]Add api for update topic properties (apache#17238)

(cherry picked from commit b21f728)
Signed-off-by: Zixuan Liu <[email protected]>

* [broker][admin] Add cmd to remove topic properties (apache#17337)

* [broker][admin] Add cmd to remove topic properties

* address comment

* address comment

(cherry picked from commit 7075a5c)
Signed-off-by: Zixuan Liu <[email protected]>

* [fix][broker] Fix NPE when updating topic's properties (apache#17352)

Co-authored-by: bjhuxiaohua <[email protected]>
(cherry picked from commit f1d1158)

---------

Co-authored-by: Xiaoyu Hou <[email protected]>
Co-authored-by: Ruguo Yu <[email protected]>
Co-authored-by: Flowermin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker doc-not-needed Your PR changes do not impact docs type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants