You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "poorbarcode (via GitHub)" <gi...@apache.org> on 2023/05/05 17:16:29 UTC

[GitHub] [pulsar] poorbarcode opened a new pull request, #20232: [fix] [broker] Fix infinite ack of Replicator after topic is closed

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

   ### Motivation
   
   In the scenarios<sup>[1]</sup> below, the replicator only acknowledges messages and does not replicate them, but if the topic is closing now, the operation acknowledge(in other words: `cursor.asyncDelete`) will be failed by the error `cursor already closed`, then it will retry again(see the code <sup>[2]</sup>) and fail again....loop.
   
   <strong>[1]</strong>: scenarios of skip messages:
   - the message can not be deserialized.
   - the entry is a transaction marker.
   - the message has been aborted by the transaction.
   - the message is repeated from another cluster.
   - the message is expired(see the retention policy).
   - the message specifies the target cluster, but the replicator is not the owner of the target cluster.
   
   <strong>[2]</strong>: Code of retry to acknowledge messages.
   https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentReplicator.java#L545
   
   Note: I tried to write a test, but it took me more than an hour but failed, so there was no test of this change.
   
   ### Modifications
   
   Just like the solution of `read entry fail`(see the code <sup>[3]</sup>): if ack failed by `CursorAlreadyClosedException`, just close the replicator(will not retry). 
   
   <strong>[3]</strong>: the solution of `read entry fail`
   https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentReplicator.java#L434
   
   ### 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:
   - x
   


-- 
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] poorbarcode commented on pull request #20232: [fix] [broker] Fix infinite ack of Replicator after topic is closed

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

   /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] poorbarcode commented on pull request #20232: [fix] [broker] Fix infinite ack of Replicator after topic is closed

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

   /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] liangyepianzhou closed pull request #20232: [fix] [broker] Fix infinite ack of Replicator after topic is closed

Posted by "liangyepianzhou (via GitHub)" <gi...@apache.org>.
liangyepianzhou closed pull request #20232: [fix] [broker] Fix infinite ack of Replicator after topic is closed
URL: https://github.com/apache/pulsar/pull/20232


-- 
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 #20232: [fix] [broker] Fix infinite ack of Replicator after topic is closed

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

   ## [Codecov](https://app.codecov.io/gh/apache/pulsar/pull/20232?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 [#20232](https://app.codecov.io/gh/apache/pulsar/pull/20232?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fa7d1b2) into [master](https://app.codecov.io/gh/apache/pulsar/commit/0dd238abf3798ba1f5b83182c1c4fb36e6ba6511?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0dd238a) will **increase** coverage by `3.19%`.
   > The diff coverage is `14.28%`.
   
   [![Impacted file tree graph](https://app.codecov.io/gh/apache/pulsar/pull/20232/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://app.codecov.io/gh/apache/pulsar/pull/20232?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   #20232      +/-   ##
   ============================================
   + Coverage     34.48%   37.68%   +3.19%     
   - Complexity    12537    12570      +33     
   ============================================
     Files          1614     1691      +77     
     Lines        126170   129048    +2878     
     Branches      13771    14071     +300     
   ============================================
   + Hits          43509    48627    +5118     
   + Misses        77053    74111    -2942     
   - Partials       5608     6310     +702     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | inttests | `24.14% <0.00%> (+0.01%)` | :arrow_up: |
   | systests | `24.74% <0.00%> (?)` | |
   | unittests | `33.21% <14.28%> (+0.09%)` | :arrow_up: |
   
   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://app.codecov.io/gh/apache/pulsar/pull/20232?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...roker/service/persistent/PersistentReplicator.java](https://app.codecov.io/gh/apache/pulsar/pull/20232?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL3BlcnNpc3RlbnQvUGVyc2lzdGVudFJlcGxpY2F0b3IuamF2YQ==) | `42.95% <0.00%> (-0.74%)` | :arrow_down: |
   | [...mon/policies/data/stats/SubscriptionStatsImpl.java](https://app.codecov.io/gh/apache/pulsar/pull/20232?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NvbW1vbi9wb2xpY2llcy9kYXRhL3N0YXRzL1N1YnNjcmlwdGlvblN0YXRzSW1wbC5qYXZh) | `69.56% <50.00%> (-0.35%)` | :arrow_down: |
   
   ... and [394 files with indirect coverage changes](https://app.codecov.io/gh/apache/pulsar/pull/20232/indirect-changes?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] Technoboy- merged pull request #20232: [fix] [broker] Fix infinite ack of Replicator after topic is closed

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


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