pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] massakam opened a new pull request #2709: Fix invalid range error when getting number of entries
Date Wed, 03 Oct 2018 17:03:05 GMT
massakam opened a new pull request #2709: Fix invalid range error when getting number of entries
URL: https://github.com/apache/pulsar/pull/2709
 
 
   For a topic with metadata similar to https://github.com/apache/pulsar/pull/2673, IllegalArgumentException
may occur in the following line:
   https://github.com/apache/pulsar/blob/b2484d92d5068d4f0699eb9c3d31640cb48f9dd0/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java#L655
   
   This is the broker log when the exception has occurred:
   [invalid_range_error.txt](https://github.com/apache/pulsar/files/2442924/invalid_range_error.txt)
   
   It is because `readPosition` is ahead of `ledger.getLastPosition().getNext()`, so `ManagedCursorImpl#getNumberOfEntries()`
should return 0 as the number of entries to read in that case.
   
   I think this issue and https://github.com/apache/pulsar/pull/2673 are the result of that
`ledger.getLastPosition()` is no longer the real last of the managed ledger because of https://github.com/apache/pulsar/pull/1550.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message