Skip to content

[cleanup][broker] Remove duplicate code to improve delete subscription - #15347

Merged
tisonkun merged 1 commit into
apache:masterfrom
nodece:improve_delete_subscription
Dec 16, 2022
Merged

[cleanup][broker] Remove duplicate code to improve delete subscription#15347
tisonkun merged 1 commit into
apache:masterfrom
nodece:improve_delete_subscription

Conversation

@nodece

@nodece nodece commented Apr 27, 2022

Copy link
Copy Markdown
Member

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

nodece commented Apr 28, 2022

Copy link
Copy Markdown
Member Author

/pulsarbot rerun-failure-checks

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

@leizhiyuan leizhiyuan left a comment

Copy link
Copy Markdown
Contributor

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

github-actions Bot commented Jun 9, 2022

Copy link
Copy Markdown

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
Copy Markdown
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

nodece commented Dec 16, 2022

Copy link
Copy Markdown
Member Author

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

Done.

@tisonkun tisonkun left a comment

Copy link
Copy Markdown
Member

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