Skip to content

[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

Merged
merged 1 commit into from
Dec 16, 2022

Conversation

nodece
Copy link
Member

@nodece nodece commented Apr 27, 2022

Fixes #15324

Motivation

internalDeleteSubscriptionForcefully and internalDeleteSubscription have duplicate code, and we should also avoid using synchronization methods like getTopicReference().

Modifications

  • Merge the duplicate code into internalDeleteSubscription()

Documentation

  • no-need-doc
    Just cleanup

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Apr 27, 2022
@nodece nodece force-pushed the improve_delete_subscription branch 2 times, most recently from 33c34ea to b8f8a2b Compare April 27, 2022 15:09
@codelipenghui codelipenghui added this to the 2.11.0 milestone Apr 28, 2022
@nodece
Copy link
Member Author

nodece commented Apr 28, 2022

/pulsarbot rerun-failure-checks

@nodece nodece requested a review from codelipenghui April 28, 2022 07:02
Copy link
Contributor

@leizhiyuan leizhiyuan left a 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

@github-actions
Copy link

github-actions bot commented Jun 9, 2022

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

@github-actions github-actions bot added the Stale label Jun 9, 2022
@codelipenghui codelipenghui modified the milestones: 2.11.0, 2.12.0 Jul 26, 2022
@tisonkun
Copy link
Member

@nodece we can proceed this patch if you can rebase and resolve the conflict. What do you think?

@github-actions github-actions bot removed the Stale label Dec 16, 2022
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
@nodece nodece force-pushed the improve_delete_subscription branch from dc132e5 to e3def84 Compare December 16, 2022 09:11
@nodece
Copy link
Member Author

nodece commented Dec 16, 2022

@nodece we can proceed this patch if you can rebase and resolve the conflict. What do you think?

Done.

Copy link
Member

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Merging...

@tisonkun tisonkun merged commit fdebf50 into apache:master Dec 16, 2022
lifepuzzlefun pushed a commit to lifepuzzlefun/pulsar that referenced this pull request Jan 10, 2023
michaeljmarshall added a commit that referenced this pull request Jan 11, 2023
### 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`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker doc-not-needed Your PR changes do not impact docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

metadata-store thread sometimes will running too long and occurs timeout of admin api
6 participants