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

[improve][broker] Add an option to return 0 when querying partitions of a nonexistent topic #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BewareMyPower
Copy link
Owner

Motivation

apache#10601 (comment)

apache#10601 changes the behavior when querying partitions of a topic that is not created. Before apache#10601, 0 is returned. After apache#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.

…of a nonexistent topic

### Motivation

apache#10601 (comment)

apache#10601 changes the behavior when querying partitions of a topic that is
not created. Before apache#10601, 0 is returned. After apache#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.
@github-actions
Copy link

The pr had no activity for 30 days, mark with Stale label.

@github-actions github-actions bot added the Stale label Dec 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant