BewareMyPower opened a new pull request, #24554:
URL: https://github.com/apache/pulsar/pull/24554

   ### Motivation
   
   https://github.com/apache/pulsar/pull/22206 misses handling the auto 
partitions update feature. By default, a producer or consumer schedules a 
periodical task to query the partition metadata via the old 
`PulsarClient#getPartitionsForTopic` API, which will trigger the partitioned 
topic auto creation.
   
   This issue does not exist when `allowAutoTopicCreationType` is 
`non-partitioned` (default) because the number of partitions is 0 for 
non-partitioned topics, while
   - Producer does not support partitions shrinking
   - Consumer will ignore querying partition metadata of non-partitioned topics 
after https://github.com/apache/pulsar/pull/10708
   
   ### Modifications
   
   - Use the new `getPartitionsForTopic` overload introduced in PIP-344 to 
disable topic auto creation in the auto partitions update task
   - Add `testPartitionsNotCreatedAfterDeletion` to verify the change
   
   NOTE: Since it relies on PIP-344, it can only be cherry-picked to branch-4.0.
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: <!-- ENTER URL HERE -->
   
   <!--
   After opening this PR, the build in apache/pulsar will fail and instructions 
will
   be provided for opening a PR in the PR author's forked repository.
   
   apache/pulsar pull requests should be first tested in your own fork since 
the 
   apache/pulsar CI based on GitHub Actions has constrained resources and quota.
   GitHub Actions provides separate quota for pull requests that are executed 
in 
   a forked repository.
   
   The tests will be run in the forked repository until all PR review comments 
have
   been handled, the tests pass and the PR is approved by a reviewer.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to