You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "gaoran10 (via GitHub)" <gi...@apache.org> on 2023/03/06 04:33:15 UTC

[GitHub] [pulsar] gaoran10 opened a new pull request, #19719: [fix][broker] Ignore topic not found exception while deleting the namespace

gaoran10 opened a new pull request, #19719:
URL: https://github.com/apache/pulsar/pull/19719

   ### Motivation
   
   A transaction system topic not found exception may occur while deleting the namespace.
   
   How to happen?
   1. Make sure the topic has a pending ack system topic(`public/default/test-delete-ns-sub__transaction_pending_ack`).
   2. Delete the namespace `public/default`.
   3. Namespace deletion operation will try to delete the user-created topic `public/default/test-delete-ns` first, at this step, the topic will unsubscribe from all subscriptions, and delete the corresponding pending ack system topic.
   4. After the namespace deletion operation delete all user-created topics, it will try to delete all system topics, which contain the pending ack topic `public/default/test-delete-ns-sub__transaction_pending_ack`.
   5. The topicNotFound exception occurs.
   
   There are two ways to fix this problem.
   1. Remove the pending ack topics from the pre-delete topic list.
   2. Ignore the topicNotFound exception while deleting the namespace.
   
   I think ignoring the exception is better because we don't know if there are other similar topics in the future.
   
   ### Modifications
   
   Ignore the topicNotFound exception while deleting the namespace.
   
   ### Verifying this change
   
   Add a new unit test.
   
   ### Does this pull request potentially affect one of the following parts:
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   *If the box was checked, please highlight the changes*
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [ ] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The threading model
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [ ] The admin CLI options
   - [ ] The metrics
   - [ ] Anything that affects deployment
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: https://github.com/gaoran10/pulsar/pull/24
   
   <!--
   After opening this PR, the build in apache/pulsar will fail and instructions will
   be provided for opening a PR in the PR author's forked repository.
   
   apache/pulsar pull requests should be first tested in your own fork since the 
   apache/pulsar CI based on GitHub Actions has constrained resources and quota.
   GitHub Actions provides separate quota for pull requests that are executed in 
   a forked repository.
   
   The tests will be run in the forked repository until all PR review comments have
   been handled, the tests pass and the PR is approved by a reviewer.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] gaoran10 commented on pull request #19719: [fix][admin] Filter pending ack topic while deleting the namespace

Posted by "gaoran10 (via GitHub)" <gi...@apache.org>.
gaoran10 commented on PR #19719:
URL: https://github.com/apache/pulsar/pull/19719#issuecomment-1461136760

   > Do you mean we need to delete the pending ack topic when deleting a normal topic?
   And should that be implemented in this PR?
   
   @liangyepianzhou Currently, the pending ack topic will be deleted while unsubscribing subscriptions, refer to [here](https://github.com/apache/pulsar/blob/v2.11.0/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java#L1018)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] liangyepianzhou commented on pull request #19719: [fix][admin] Filter pending ack topic while deleting the namespace

Posted by "liangyepianzhou (via GitHub)" <gi...@apache.org>.
liangyepianzhou commented on PR #19719:
URL: https://github.com/apache/pulsar/pull/19719#issuecomment-1459901396

   >1. Filter pending ack topic while deleting namespace.
   > If failed to delete the pending ack topic, the delete topic operation will also be failed. We need to make sure the pending ack topic can be cleaned up while deleting the topic.
   
   Thanks for your feedback, but I also have some questions.
   Do you mean we need to delete the pending ack topic when deleting a normal topic?
   And should that be implemented in this PR?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] liangyepianzhou merged pull request #19719: [fix][admin] Filter pending ack topic while deleting the namespace

Posted by "liangyepianzhou (via GitHub)" <gi...@apache.org>.
liangyepianzhou merged PR #19719:
URL: https://github.com/apache/pulsar/pull/19719


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] codecov-commenter commented on pull request #19719: [fix][admin] Filter pending ack topic while deleting the namespace

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #19719:
URL: https://github.com/apache/pulsar/pull/19719#issuecomment-1459678472

   # [Codecov](https://codecov.io/gh/apache/pulsar/pull/19719?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19719](https://codecov.io/gh/apache/pulsar/pull/19719?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5314a7a) into [master](https://codecov.io/gh/apache/pulsar/commit/bce80d9b525d1b21f8440185e7529d492db420eb?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (bce80d9) will **increase** coverage by `37.63%`.
   > The diff coverage is `81.25%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/pulsar/pull/19719/graphs/tree.svg?width=650&height=150&src=pr&token=acYqCpsK9J&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/pulsar/pull/19719?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@              Coverage Diff              @@
   ##             master   #19719       +/-   ##
   =============================================
   + Coverage     24.63%   62.27%   +37.63%     
   - Complexity      292    25939    +25647     
   =============================================
     Files          1593     1848      +255     
     Lines        123505   135868    +12363     
     Branches      13493    14953     +1460     
   =============================================
   + Hits          30429    84615    +54186     
   + Misses        88573    43508    -45065     
   - Partials       4503     7745     +3242     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | inttests | `24.56% <21.87%> (-0.08%)` | :arrow_down: |
   | systests | `25.08% <21.87%> (?)` | |
   | unittests | `59.50% <81.25%> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/pulsar/pull/19719?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...va/org/apache/pulsar/client/impl/ConsumerBase.java](https://codecov.io/gh/apache/pulsar/pull/19719?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL0NvbnN1bWVyQmFzZS5qYXZh) | `64.52% <ø> (+25.84%)` | :arrow_up: |
   | [...n/util/collections/GrowableArrayBlockingQueue.java](https://codecov.io/gh/apache/pulsar/pull/19719?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NvbW1vbi91dGlsL2NvbGxlY3Rpb25zL0dyb3dhYmxlQXJyYXlCbG9ja2luZ1F1ZXVlLmphdmE=) | `93.90% <50.00%> (+44.17%)` | :arrow_up: |
   | [...pache/pulsar/broker/admin/impl/NamespacesBase.java](https://codecov.io/gh/apache/pulsar/pull/19719?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9hZG1pbi9pbXBsL05hbWVzcGFjZXNCYXNlLmphdmE=) | `64.86% <100.00%> (+54.61%)` | :arrow_up: |
   | [...va/org/apache/pulsar/broker/service/ServerCnx.java](https://codecov.io/gh/apache/pulsar/pull/19719?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL1NlcnZlckNueC5qYXZh) | `54.48% <100.00%> (+22.84%)` | :arrow_up: |
   | [.../client/admin/internal/PulsarAdminBuilderImpl.java](https://codecov.io/gh/apache/pulsar/pull/19719?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC1hZG1pbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9hZG1pbi9pbnRlcm5hbC9QdWxzYXJBZG1pbkJ1aWxkZXJJbXBsLmphdmE=) | `87.83% <100.00%> (+46.74%)` | :arrow_up: |
   | [...g/apache/pulsar/admin/cli/PulsarAdminSupplier.java](https://codecov.io/gh/apache/pulsar/pull/19719?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC10b29scy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2FkbWluL2NsaS9QdWxzYXJBZG1pblN1cHBsaWVyLmphdmE=) | `90.38% <100.00%> (+90.38%)` | :arrow_up: |
   | [...a/org/apache/pulsar/admin/cli/PulsarAdminTool.java](https://codecov.io/gh/apache/pulsar/pull/19719?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC10b29scy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2FkbWluL2NsaS9QdWxzYXJBZG1pblRvb2wuamF2YQ==) | `86.97% <100.00%> (+86.97%)` | :arrow_up: |
   | [...va/org/apache/pulsar/client/impl/ConsumerImpl.java](https://codecov.io/gh/apache/pulsar/pull/19719?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL0NvbnN1bWVySW1wbC5qYXZh) | `69.78% <100.00%> (+35.27%)` | :arrow_up: |
   | [...ava/org/apache/pulsar/common/topics/TopicList.java](https://codecov.io/gh/apache/pulsar/pull/19719?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NvbW1vbi90b3BpY3MvVG9waWNMaXN0LmphdmE=) | `95.23% <100.00%> (+95.23%)` | :arrow_up: |
   | [...lsar/broker/loadbalance/impl/ThresholdShedder.java](https://codecov.io/gh/apache/pulsar/pull/19719?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9sb2FkYmFsYW5jZS9pbXBsL1RocmVzaG9sZFNoZWRkZXIuamF2YQ==) | `31.45% <0.00%> (-0.81%)` | :arrow_down: |
   | ... and [1389 more](https://codecov.io/gh/apache/pulsar/pull/19719?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] gaoran10 commented on pull request #19719: [fix][admin] Filter pending ack topic while deleting the namespace

Posted by "gaoran10 (via GitHub)" <gi...@apache.org>.
gaoran10 commented on PR #19719:
URL: https://github.com/apache/pulsar/pull/19719#issuecomment-1459597532

   /pulsarbot rerun-failure-checks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] gaoran10 commented on pull request #19719: [fix][admin] Filter pending ack topic while deleting the namespace

Posted by "gaoran10 (via GitHub)" <gi...@apache.org>.
gaoran10 commented on PR #19719:
URL: https://github.com/apache/pulsar/pull/19719#issuecomment-1459874755

   > After discussion, we decide to filter the pending ack topics while deleting the namespace.
   
   Will the dirty data be generated in this way?
   
   1. Filter pending ack topic while deleting namespace.
   If failed to delete the pending ack topic, the delete topic operation will also be failed. We need to make sure the pending ack topic can be cleaned up while deleting the topic.
   
   2. Ignore the topic NotFound exception while deleting the namespace.
   We need to make sure the topic is already cleaned up while encountering the topic NotFound exception.
   
   /cc @liangyepianzhou @congbobo184 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] liangyepianzhou commented on pull request #19719: [fix][admin] Filter pending ack topic while deleting the namespace

Posted by "liangyepianzhou (via GitHub)" <gi...@apache.org>.
liangyepianzhou commented on PR #19719:
URL: https://github.com/apache/pulsar/pull/19719#issuecomment-1459639152

   > After discussion, we decide to filter the pending ack topics while deleting the namespace.
   
   Will the dirty data be generated in this way?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] codelipenghui commented on pull request #19719: [fix][admin] Filter pending ack topic while deleting the namespace

Posted by "codelipenghui (via GitHub)" <gi...@apache.org>.
codelipenghui commented on PR #19719:
URL: https://github.com/apache/pulsar/pull/19719#issuecomment-1458302418

   @gaoran10 Do we need to cherry-pick to release branches? Which version is impacted?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org