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

[Broker] Apply PolicyHierarchyValue to inactiveTopicPolicies #12687

Merged
merged 2 commits into from
Nov 11, 2021

Conversation

Jason918
Copy link
Contributor

@Jason918 Jason918 commented Nov 9, 2021

Motivation

#12658 introduced PolicyHierarchyValue to cache broker/namespace/topic level policy value.

This pull request applied PolicyHierarchyValue to inactiveTopicPolicies, which can avoid some complex checking on updates and make it easier to understand.

Modifications

Changed type of inactiveTopicPolicies to PolicyHierarchyValue.

  • Init with broker value.
  • update namespace level value in onPoliciesUpdate(Policies)
  • update topic level value in onUpdate(TopicPolicies)

Verifying this change

  • Make sure that the change passes the CI checks.

This change is already covered by existing tests, such as pulsar-broker/src/test/java/org/apache/pulsar/broker/service/InactiveTopicDeleteTest.java

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?

  • no-need-doc
    Polish code, no documents needed.

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Nov 9, 2021
@Jason918
Copy link
Contributor Author

Jason918 commented Nov 9, 2021

/pulsarbot run-failure-checks

@hezhangjian
Copy link
Member

#12675 If that's your test failure reason, you should have a rebase or merge

@Jason918 Jason918 force-pushed the opt_inactiveTopicPolicies branch from 1d1234c to a6d8d24 Compare November 9, 2021 13:35
@Jason918 Jason918 force-pushed the opt_inactiveTopicPolicies branch from a6d8d24 to 3e58b80 Compare November 10, 2021 03:29
@Jason918
Copy link
Contributor Author

/pulsarbot run-failure-checks

1 similar comment
@Jason918
Copy link
Contributor Author

/pulsarbot run-failure-checks

@Jason918
Copy link
Contributor Author

@codelipenghui @hangc0276 @linlinnn PTAL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants