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/09/04 06:13:47 UTC

[GitHub] [pulsar] mattisonchao opened a new pull request, #17454: [improve][broker] Avoid infinite cursor increment `readPosition` growth.

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

   ### Motivation
   
   In the current implementation, if the managed cursor `readPosition` is greater than the maximum ledger position, the `readPosition` will increment to infinity. 
   You can use the new test `testReadPositionUpdateOverflow` to verify this condition.
   
   e.g.
   ```java
   java.lang.AssertionError: 
   Expected :8:0
   Actual   :58:0
   <Click to see difference>
   ```
   I'm not sure what condition would increase the read position by more than the max ledger. But I think it's worth supporting this mechanism to prevent this from happening.
   
   > We can keep looking for another logic that might set `readPosition` to be larger than the largest ledger.
   
   ### Modifications
   
   - Move the old logic in `startReadOperationOnLedger` to `asyncReadEntries` to make the `OpReadEntry` more clear.
   - If `readPosition` grater than the maximum ledger id throw `ManagedLedgerException.NoMoreEntriesToReadException`.
   
   ### Verifying this change
   
   - [x] Make sure that the change passes the CI checks.
   
   Add new test `testReadPositionUpdateOverflow` to verify this change.
   
   ### Documentation
   
   - [x] `doc-not-needed` 
   (Please explain why)
     
   


-- 
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] github-actions[bot] commented on pull request #17454: [improve][broker] Avoid infinite cursor increment `readPosition` growth.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #17454:
URL: https://github.com/apache/pulsar/pull/17454#issuecomment-1236268341

   @mattisonchao Please provide a correct documentation label for your PR.
   Instructions see [Pulsar Documentation Label Guide](https://docs.google.com/document/d/1Qw7LHQdXWBW9t2-r-A7QdFDBwmZh6ytB4guwMoXHqc0).


-- 
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] mattisonchao commented on pull request #17454: [improve][broker] Avoid infinite cursor growth `readPosition`.

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

   Close this PR until we got the case causing this problem.


-- 
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] mattisonchao closed pull request #17454: [improve][broker] Avoid infinite cursor growth `readPosition`.

Posted by GitBox <gi...@apache.org>.
mattisonchao closed pull request #17454: [improve][broker] Avoid infinite cursor growth `readPosition`.
URL: https://github.com/apache/pulsar/pull/17454


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