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 the null point caused by deleting the system topic policy #12367

Merged
merged 1 commit into from
Oct 22, 2021

Conversation

nodece
Copy link
Member

@nodece nodece commented Oct 14, 2021

Signed-off-by: Zixuan Liu nodeces@gmail.com

Motivation

Message<PulsarEvent>.getValue() sometimes returns null in SystemTopicBasedTopicPoliciesService.notifyListener(), so we need to skip the messages that do not belong to the policy type, this problem can cause the policy service to fail to work.

Modifications

  • Checks the Message<PulsarEvent>.getValue() value.
  • Uses the event instead of null as message value when delete policy.

Verifying this change

  • Make sure that the change passes the CI checks.

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): no
  • The public API: no
  • The schema: no
  • The default values of configurations: no
  • The wire protocol: no
  • The rest endpoints: no
  • The admin cli options: no
  • Anything that affects deployment: no

Documentation

Check the box below and label this PR (if you have committer privilege).

Need to update docs?

  • doc-required
  • no-need-doc
  • doc

@nodece
Copy link
Member Author

nodece commented Oct 15, 2021

/pulsarbot run-failure-checks

@codelipenghui codelipenghui added this to the 2.9.0 milestone Oct 15, 2021
@codelipenghui codelipenghui added the type/bug The PR fixed a bug or issue reported a bug label Oct 15, 2021
@nodece nodece changed the title Fix filter the policy messages Fix update system topic policy Oct 15, 2021
@nodece nodece changed the title Fix update system topic policy Fix the null point caused by deleting the system theme policy Oct 15, 2021
@nodece nodece requested a review from 315157973 October 15, 2021 04:31
@eolivelli eolivelli modified the milestones: 2.9.0, 2.10.0 Oct 15, 2021
@nodece nodece marked this pull request as draft October 15, 2021 11:18
@nodece nodece marked this pull request as ready for review October 15, 2021 11:48
@nodece nodece requested a review from 315157973 October 15, 2021 11:49
@eolivelli eolivelli changed the title Fix the null point caused by deleting the system theme policy Fix the null point caused by deleting the system policy Oct 15, 2021
@Anonymitaet Anonymitaet added the doc-not-needed Your PR changes do not impact docs label Oct 18, 2021
@nodece nodece changed the title Fix the null point caused by deleting the system policy Fix the null point caused by deleting the topic policy Oct 18, 2021
@nodece nodece changed the title Fix the null point caused by deleting the topic policy Fix the null point caused by deleting the system topic policy Oct 18, 2021
@nodece nodece force-pushed the filter_policy_messages branch 3 times, most recently from 8467088 to 7dd4d2a Compare October 18, 2021 04:09
@nodece
Copy link
Member Author

nodece commented Oct 18, 2021

/pulsarbot run-failure-checks

@nodece nodece force-pushed the filter_policy_messages branch 2 times, most recently from b58ebb9 to 230a91a Compare October 18, 2021 07:42
@nodece nodece requested a review from 315157973 October 18, 2021 09:37
Copy link
Contributor

@315157973 315157973 left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
Copy link
Member

@RobertIndie RobertIndie left a comment

Choose a reason for hiding this comment

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

LGTM

@zymap zymap merged commit d310e79 into apache:master Oct 22, 2021
zymap pushed a commit that referenced this pull request Oct 22, 2021
Signed-off-by: Zixuan Liu <nodeces@gmail.com>

### Motivation

`Message<PulsarEvent>.getValue()` sometimes returns `null` in `SystemTopicBasedTopicPoliciesService.notifyListener()`, so we need to skip the messages that do not belong to the policy type, this problem can cause the policy service to fail to work.

### Modifications

- Checks the `Message<PulsarEvent>.getValue()` value.
- Uses the `event` instead of `null` as message value when delete policy.

### Verifying this change

- [x] Make sure that the change passes the CI checks.

### Does this pull request potentially affect one of the following parts:

*If `yes` was chosen, please highlight the changes*

  - Dependencies (does it add or upgrade a dependency): no
  - The public API: no
  - The schema: no
  - The default values of configurations: no
  - The wire protocol: no
  - The rest endpoints: no
  - The admin cli options: no
  - Anything that affects deployment: no

### Documentation

Check the box below and label this PR (if you have committer privilege).

Need to update docs?

- [ ] doc-required
- [x] no-need-doc
- [ ] doc

(cherry picked from commit d310e79)
@zymap zymap added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Oct 22, 2021
eolivelli pushed a commit to eolivelli/pulsar that referenced this pull request Nov 29, 2021
…#12367)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>

### Motivation

`Message<PulsarEvent>.getValue()` sometimes returns `null` in `SystemTopicBasedTopicPoliciesService.notifyListener()`, so we need to skip the messages that do not belong to the policy type, this problem can cause the policy service to fail to work.


### Modifications

- Checks the `Message<PulsarEvent>.getValue()` value.
- Uses the `event` instead of `null` as message value when delete policy.

### Verifying this change

- [x] Make sure that the change passes the CI checks.

### Does this pull request potentially affect one of the following parts:

*If `yes` was chosen, please highlight the changes*

  - Dependencies (does it add or upgrade a dependency): no
  - The public API: no
  - The schema: no
  - The default values of configurations: no
  - The wire protocol: no
  - The rest endpoints: no
  - The admin cli options: no
  - Anything that affects deployment: no

### Documentation

Check the box below and label this PR (if you have committer privilege).

Need to update docs? 

- [ ] doc-required   
- [x] no-need-doc 
- [ ] doc
codelipenghui pushed a commit that referenced this pull request Jan 10, 2022
Signed-off-by: Zixuan Liu <nodeces@gmail.com>

### Motivation

`Message<PulsarEvent>.getValue()` sometimes returns `null` in `SystemTopicBasedTopicPoliciesService.notifyListener()`, so we need to skip the messages that do not belong to the policy type, this problem can cause the policy service to fail to work.

### Modifications

- Checks the `Message<PulsarEvent>.getValue()` value.
- Uses the `event` instead of `null` as message value when delete policy.

### Verifying this change

- [x] Make sure that the change passes the CI checks.

### Does this pull request potentially affect one of the following parts:

*If `yes` was chosen, please highlight the changes*

  - Dependencies (does it add or upgrade a dependency): no
  - The public API: no
  - The schema: no
  - The default values of configurations: no
  - The wire protocol: no
  - The rest endpoints: no
  - The admin cli options: no
  - Anything that affects deployment: no

### Documentation

Check the box below and label this PR (if you have committer privilege).

Need to update docs?

- [ ] doc-required
- [x] no-need-doc
- [ ] doc

(cherry picked from commit d310e79)
@codelipenghui codelipenghui added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label Jan 10, 2022
nodece added a commit to streamnative/pulsar-archived that referenced this pull request Jan 12, 2022
…#12367)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>

### Motivation

`Message<PulsarEvent>.getValue()` sometimes returns `null` in `SystemTopicBasedTopicPoliciesService.notifyListener()`, so we need to skip the messages that do not belong to the policy type, this problem can cause the policy service to fail to work.

### Modifications

- Checks the `Message<PulsarEvent>.getValue()` value.
- Uses the `event` instead of `null` as message value when delete policy.

### Verifying this change

- [x] Make sure that the change passes the CI checks.

### Does this pull request potentially affect one of the following parts:

*If `yes` was chosen, please highlight the changes*

  - Dependencies (does it add or upgrade a dependency): no
  - The public API: no
  - The schema: no
  - The default values of configurations: no
  - The wire protocol: no
  - The rest endpoints: no
  - The admin cli options: no
  - Anything that affects deployment: no

### Documentation

Check the box below and label this PR (if you have committer privilege).

Need to update docs?

- [ ] doc-required
- [x] no-need-doc
- [ ] doc

(cherry picked from commit d310e79)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker cherry-picked/branch-2.8 Archived: 2.8 is end of life cherry-picked/branch-2.9 Archived: 2.9 is end of life doc-not-needed Your PR changes do not impact docs release/2.8.2 release/2.9.2 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.

8 participants