BewareMyPower opened a new pull request, #18594: URL: https://github.com/apache/pulsar/pull/18594
### Motivation https://github.com/apache/pulsar/pull/10601#issuecomment-1317441807 #10601 changes the behavior when querying partitions of a topic that is not created. Before #10601, 0 is returned. After #10601, an exception will be thrown to indicate the topic does not exist. It leads to the incompatibility with some old Pulsar clients that do not add the "checkAllowAutoCreation=true" query param. If they use HTTP service URL like "http://localhost:8080", when accessing a topic that does not exist, the client will fail. The affected Pulsar clients include Java client <= 2.4.2 and C++/Python client <= 2.8.0. ### Modifications Add an option `checkTopicExistsWhenQueryPartitions` (default: true) to determine the behavior. Disable this option to keep the original behavior that 0 will be returned when querying partitions of a nonexistent topic. ### Verifying this change - [ ] Make sure that the change passes the CI checks. This change added `HttpPartitionMetadataLookupTest` to show the behavior when `checkTopicExistsWhenQueryPartitions` is true or false. ### Documentation <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. --> - [ ] `doc` <!-- Your PR contains doc changes. Please attach the local preview screenshots (run `sh start.sh` at `pulsar/site2/website`) to your PR description, or else your PR might not get merged. --> - [ ] `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: https://github.com/BewareMyPower/pulsar/pull/10 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
