[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14000311#comment-14000311
 ] 

Sijie Guo commented on BOOKKEEPER-758:
--------------------------------------

in general, if a reader is tailing current ledger, it would use following code 
snippet to poll latest lac to move on. the multiple callbacks is to update the 
lac internally, so when the reader move on to read next entry, the 
getLastAddConfirmed will return updated lac.

{code}
long readEntry = xx;
lh.readEntries(readEntry, readEntry);
++readEntry;
if (readEntry > lh.getLastAddConfirmed()) {
  lh.readLastAddConfirmed();
}
{code}

> Add TryReadLastAddConfirmed API
> -------------------------------
>
>                 Key: BOOKKEEPER-758
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-758
>             Project: Bookkeeper
>          Issue Type: Improvement
>          Components: bookkeeper-client
>            Reporter: Sijie Guo
>            Assignee: Sijie Guo
>             Fix For: 4.3.0
>
>         Attachments: BOOKKEEPER-758.diff, BOOKKEEPER-758.v2.diff
>
>
> add TryReadLastConfirmed to read last confirmed without coverage checking, as 
> for readers which polls LAC, they just need LAC.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to