[
https://issues.apache.org/jira/browse/BOOKKEEPER-758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14009572#comment-14009572
]
Ivan Kelly commented on BOOKKEEPER-758:
---------------------------------------
Ah, if it doesn't go to the client it's fine. There's a race condition in
asyncTryReadLastConfirmed() though. Even though completed is volatile, there's
no guarantee that two threads won't read completed with value false, then run
the completion action, and both try to set completed to true. It would be
better to use a atomicboolean and check and set it at the start of the callback.
> 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)