Skip to content

Conversation

@massakam
Copy link
Contributor

@massakam massakam commented Oct 3, 2018

For a topic with metadata similar to #2673, IllegalArgumentException may occur in the following line:

return getNumberOfEntries(Range.closedOpen(readPosition, ledger.getLastPosition().getNext()));

This is the broker log when the exception has occurred:
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 #2673 are the result of that ledger.getLastPosition() is no longer the real last of the managed ledger because of #1550.

@massakam massakam added this to the 2.3.0 milestone Oct 3, 2018
@massakam massakam self-assigned this Oct 3, 2018
Copy link
Contributor

@merlimat merlimat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@nkurihar
Copy link
Contributor

nkurihar commented Oct 3, 2018

rerun cpp tests

@nkurihar
Copy link
Contributor

nkurihar commented Oct 4, 2018

rerun integration tests

@sijie sijie merged commit 12962d0 into apache:master Oct 4, 2018
@massakam massakam deleted the invalid-range-error branch October 4, 2018 01:35
@massakam massakam modified the milestones: 2.3.0, 2.2.1 Oct 29, 2018
@merlimat merlimat modified the milestones: 2.2.1, 2.2.0 Dec 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants