-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][broker]fail to update partition meta of topic due to ConflictException: subscription already exists for topic #17251
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
Conversation
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Outdated
Show resolved
Hide resolved
…cription already exists for topic
a0b7ae8 to
4a8a48e
Compare
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Outdated
Show resolved
Hide resolved
|
/pulsarbot run-failure-checks |
1 similar comment
|
/pulsarbot run-failure-checks |
Jason918
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fix LGTM.
We can also consider add a "force" parameter in admin.topics().createSubscription() to ignore conflict exception when the subscription already exists.
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Outdated
Show resolved
Hide resolved
|
LGTM now, left minor commnet :) @HQebupt |
I will continue to pay attention to this point. |
|
/pulsarbot run-failure-checks |
|
/pulsarbot run-failure-checks |
1 similar comment
|
/pulsarbot run-failure-checks |
…ception: subscription already exists for topic (apache#17251) ### Motivation apache#10374 wants to handle the existing subscriptions when updating partition with `force` command parameter. However, it could not update the partition metadata if the `Subscription already exists for topic` exception comes. Because it miss updating when handling such exception.
|
Can you help open a new PR to branch-2.10? There are a lot conflict when cherry-pick directly. @HQebupt |
Sure |
|
Move |
…ception: subscription already exists for topic (#17251) ### Motivation #10374 wants to handle the existing subscriptions when updating partition with `force` command parameter. However, it could not update the partition metadata if the `Subscription already exists for topic` exception comes. Because it miss updating when handling such exception.
fixed #10374
Motivation
#10374 wants to handle the existing subscriptions when updating partition with
forcecommand parameter. However, it could not update the partition metadata if theSubscription already exists for topicexception comes. Because it miss updating when handling such exception.pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Lines 4360 to 4392 in 3160edc
The line 4364
updatePartitionedTopicAsynccould not reach if the line 4362createSubscriptionsoccur an exception ofPulsarAdminException$ConflictException: Subscription already exists for topic.Modifications
update topic partition metadata when handling
ConflictException.Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
If
yeswas chosen, please highlight the changesDocumentation
Check the box below and label this PR (if you have committer privilege).
Need to update docs?
doc-not-needed