You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/10/09 03:35:15 UTC

[GitHub] [pulsar] Technoboy- opened a new pull request, #17971: [fix][ML] Fix `getPositionAfterN` infinite loop.

Technoboy- opened a new pull request, #17971:
URL: https://github.com/apache/pulsar/pull/17971

   
   Fixes #17967
   
   Master Issue: #17967
   
   ### Motivation
   
   The root cause is here(line-3365)  :
   https://github.com/apache/pulsar/blob/08f5766d95034ce27c44ee30e4734d2a8f078e11/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java#L3364-L3366
   
   The `currentLedgerId` should be : 
   ```
   currentLedgerId = lid != null ? lid : (ledgers.lastKey());
   ```
   
   ### 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/Technoboy-/pulsar/pull/9


-- 
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 #17971: [fix][ML] Fix `getPositionAfterN` infinite loop.

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on PR #17971:
URL: https://github.com/apache/pulsar/pull/17971#issuecomment-1273291778

   > We already have the test testGetPositionAfterN
   
   @Technoboy- So why did the test get passed before? I think the test can't cover the case that introduce the infinite loop?


-- 
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- commented on pull request #17971: [fix][ML] Fix `getPositionAfterN` infinite loop.

Posted by GitBox <gi...@apache.org>.
Technoboy- commented on PR #17971:
URL: https://github.com/apache/pulsar/pull/17971#issuecomment-1272694406

   > Great catch!
   > 
   > Is it able to add an unit test?
   
   We already have the test `testGetPositionAfterN`


-- 
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- commented on pull request #17971: [fix][broker] Fix `getPositionAfterN` infinite loop.

Posted by GitBox <gi...@apache.org>.
Technoboy- commented on PR #17971:
URL: https://github.com/apache/pulsar/pull/17971#issuecomment-1275685383

   > @Technoboy- Please check the failed test
   
   Yes, I have fixed by https://github.com/apache/pulsar/pull/17993


-- 
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 #17971: [fix][broker] Fix `getPositionAfterN` infinite loop.

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on PR #17971:
URL: https://github.com/apache/pulsar/pull/17971#issuecomment-1275551598

   @Technoboy- Please check the failed test


-- 
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- commented on pull request #17971: [fix][ML] Fix `getPositionAfterN` infinite loop.

Posted by GitBox <gi...@apache.org>.
Technoboy- commented on PR #17971:
URL: https://github.com/apache/pulsar/pull/17971#issuecomment-1274204581

   > > We already have the test testGetPositionAfterN
   > 
   > @Technoboy- So why did the test get passed before? I think the test can't cover the case that introduces the infinite loop?
   
   Ah, yes, right.  Sorry for this.   I have added the test.


-- 
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 #17971: [fix][broker] Fix `getPositionAfterN` infinite loop.

Posted by GitBox <gi...@apache.org>.
Technoboy- merged PR #17971:
URL: https://github.com/apache/pulsar/pull/17971


-- 
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 #17971: [fix][broker] Fix `getPositionAfterN` infinite loop.

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #17971:
URL: https://github.com/apache/pulsar/pull/17971#issuecomment-1275864824

   # [Codecov](https://codecov.io/gh/apache/pulsar/pull/17971?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > :exclamation: No coverage uploaded for pull request base (`master@7e420c6`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#section-missing-base-commit).
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/pulsar/pull/17971/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/17971?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   #17971   +/-   ##
   =========================================
     Coverage          ?   26.91%           
     Complexity        ?     3523           
   =========================================
     Files             ?      393           
     Lines             ?    43418           
     Branches          ?     4462           
   =========================================
     Hits              ?    11687           
     Misses            ?    29893           
     Partials          ?     1838           
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | unittests | `26.91% <0.00%> (?)` | |
   
   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.
   
   


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