Skip to content

Validate cursor-readPosition before reading while checkingBacklogCursor - #162

Merged
merlimat merged 1 commit into
apache:masterfrom
rdhabalia:bk_read
Jan 9, 2017
Merged

merlimat merged 1 commit into
apache:masterfrom
rdhabalia:bk_read

Conversation

@rdhabalia

Copy link
Copy Markdown
Contributor

Motivation

Cursor's readPosition might not be a valid (when cursor read last entry of the ledger) when checkBackloggedCursors task tries to read from BK and it raises below exception due to invalid entry:

Caused by: org.apache.bookkeeper.client.BKException$BKReadException: null
at org.apache.bookkeeper.client.LedgerHandle.asyncReadEntries(LedgerHandle.java:459)

Modifications

Get next valid entry before reading from BK if cursor's current readPosition is invalid.

Result

It prevents to failure of checkBacklogCursor if cursor's readPosition is invalid.

@yahoocla

yahoocla commented Jan 6, 2017

Copy link
Copy Markdown

CLA is valid!

2 similar comments
@yahoocla

yahoocla commented Jan 6, 2017

Copy link
Copy Markdown

CLA is valid!

@yahoocla

yahoocla commented Jan 6, 2017

Copy link
Copy Markdown

CLA is valid!

@rdhabalia rdhabalia added the type/bug The PR fixed a bug or issue reported a bug label Jan 6, 2017
@rdhabalia rdhabalia added this to the 1.16 milestone Jan 6, 2017
@rdhabalia rdhabalia self-assigned this Jan 6, 2017

@saandrews saandrews left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good

@merlimat merlimat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@merlimat
merlimat merged commit 3a5ff46 into apache:master Jan 9, 2017
@rdhabalia
rdhabalia deleted the bk_read branch January 18, 2017 21:55
sijie added a commit to sijie/pulsar that referenced this pull request Mar 4, 2018
hrsakai pushed a commit to hrsakai/pulsar that referenced this pull request Dec 10, 2020
cbornet pushed a commit to cbornet/pulsar that referenced this pull request Feb 22, 2023
* Enable Github Actions for 2.10_ds pull requests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/bug The PR fixed a bug or issue reported a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants