-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[cleanup][broker] Remove duplicate code to improve delete subscription #15347
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
33c34ea
to
b8f8a2b
Compare
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Outdated
Show resolved
Hide resolved
b8f8a2b
to
0c64c79
Compare
/pulsarbot rerun-failure-checks |
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.
LGMT, I cherryed pick the code for my test , It is ok now
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Outdated
Show resolved
Hide resolved
The pr had no activity for 30 days, mark with Stale label. |
@nodece we can proceed this patch if you can rebase and resolve the conflict. What do you think? |
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
dc132e5
to
e3def84
Compare
Done. |
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.
LGTM. Merging...
apache#15347) Signed-off-by: Zixuan Liu <nodeces@gmail.com>
### Motivation In #15347, there is a regression where the `subName` needed to be passed to the authorization provider. That PR is not released, so this PR is just cleanup ### Modifications * Pass `subName` for `validateTopicOperationAsync` in `PersistentTopicsBase#internalDeleteSubscriptionForNonPartitionedTopicAsync` ### Verifying this change We should add testing to this part of the code base to prevent future regressions. Issue requesting better testing is added: #19183. ### Does this pull request potentially affect one of the following parts: This is not a breaking change. ### Documentation - [x] `doc-not-needed`
Fixes #15324
Motivation
internalDeleteSubscriptionForcefully
andinternalDeleteSubscription
have duplicate code, and we should also avoid using synchronization methods likegetTopicReference()
.Modifications
internalDeleteSubscription()
Documentation
no-need-doc
Just cleanup