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][admin]allowAutoTopicCreation and allowAutoTopicCreationType etc should be dynamically configured #16023

Merged
merged 12 commits into from
Jul 4, 2022

Conversation

Radiancebobo
Copy link
Contributor

@Radiancebobo Radiancebobo commented Jun 12, 2022

allowAutoTopicCreation and allowAutoTopicCreationType etc should be dynamically configured

Fixes #16020

Motivation

In the broker.conf configuration, there are these configurations:

  • allowAutoTopicCreation
  • allowAutoTopicCreationType
  • defaultNumPartitions
  • maxNumPartitionsPerPartitionedTopic
  • brokerDeleteInactiveTopicsEnabled
  • brokerDeleteInactiveTopicsFrequencySeconds
  • brokerDeleteInactiveTopicsMaxInactiveDurationSeconds
  • brokerDeleteInactivePartitionedTopicMetadataEnabled
  • brokerDeleteInactiveTopicsMode
  • allowAutoSubscriptionCreation

I think these should be dynamically configurable.

Pulsar has namespace-level policy, but the broker-level dynamically configuration is missing.

Modifications

The change is very simple, just add dynamic identification to these configurations in ServiceConfiguration.java, and add a callback function when updating.

Documentation

Need to update docs?

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-complete
    (Docs have been already added)

…ationType etc should be dynamically configured
@github-actions github-actions bot added doc-complete Your PR changes impact docs and the related docs have been already added. doc-required Your PR changes impact docs and you will update later. labels Jun 12, 2022
Copy link
Contributor

@codelipenghui codelipenghui left a comment

Choose a reason for hiding this comment

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

The change looks good. Could you please add a UT for the new change?

Here is an example PR #13121 which added subscriptionTypesEnabled dynamic configuration support.

@codelipenghui codelipenghui added this to the 2.11.0 milestone Jun 12, 2022
@Anonymitaet Anonymitaet added doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. and removed doc-required Your PR changes impact docs and you will update later. doc-complete Your PR changes impact docs and the related docs have been already added. labels Jun 13, 2022
@Radiancebobo
Copy link
Contributor Author

The change looks good. Could you please add a UT for the new change?

Here is an example PR #13121 which added subscriptionTypesEnabled dynamic configuration support.

OK, I will supplement the corresponding unit tests as soon as possible

…ts. add description of brokerDeleteInactivePartitionedTopicMetadataEnabled to doc.
Radiancebobo added a commit to Radiancebobo/pulsar that referenced this pull request Jun 13, 2022
@Radiancebobo
Copy link
Contributor Author

Unit tests that fail to run also happen on the master branch, it doesn't look like it's caused by my commits, I'll try my best to take the time to fix them.

Copy link
Member

@Demogorgon314 Demogorgon314 left a comment

Choose a reason for hiding this comment

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

Overall LGTM, just left some small comments.

@Radiancebobo
Copy link
Contributor Author

/pulsarbot run-failure-checks

Copy link
Contributor

@Jason918 Jason918 left a comment

Choose a reason for hiding this comment

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

LGTM

@Radiancebobo
Copy link
Contributor Author

/pulsarbot run-failure-checks

@Anonymitaet Anonymitaet mentioned this pull request Jul 1, 2022
4 tasks
@github-actions github-actions bot added doc-complete Your PR changes impact docs and the related docs have been already added. and removed doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. labels Jul 1, 2022
@github-actions
Copy link

github-actions bot commented Jul 1, 2022

@Radiancebobo Please select only one documentation label for your PR.
Instructions see Pulsar Documentation Label Guide.

Copy link
Contributor

@BewareMyPower BewareMyPower left a comment

Choose a reason for hiding this comment

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

Could you add atMost to other tests of InactiveTopicDeleteTest as well?

@Radiancebobo
Copy link
Contributor Author

Could you add atMost to other tests of InactiveTopicDeleteTest as well?

ok

@Radiancebobo
Copy link
Contributor Author

/pulsarbot run-failure-checks

1 similar comment
@Radiancebobo
Copy link
Contributor Author

/pulsarbot run-failure-checks

@Radiancebobo
Copy link
Contributor Author

@BewareMyPower Can you help me merge this branch to master?

@BewareMyPower BewareMyPower merged commit 0d8c7ef into apache:master Jul 4, 2022
Nicklee007 pushed a commit to Nicklee007/pulsar that referenced this pull request Jul 5, 2022
wuxuanqicn pushed a commit to wuxuanqicn/pulsar that referenced this pull request Jul 14, 2022
nodece pushed a commit to nodece/pulsar that referenced this pull request Mar 18, 2025
… should be dynamically configured (apache#16023)

(cherry picked from commit 0d8c7ef)
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
nodece pushed a commit to ascentstream/pulsar that referenced this pull request Mar 18, 2025
… should be dynamically configured (apache#16023)

(cherry picked from commit 0d8c7ef)
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
nodece pushed a commit to ascentstream/pulsar that referenced this pull request Mar 18, 2025
… should be dynamically configured (apache#16023)

(cherry picked from commit 0d8c7ef)
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-complete Your PR changes impact docs and the related docs have been already added.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allowAutoTopicCreation and allowAutoTopicCreationType etc should be dynamically configured
8 participants