You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Flavio Junqueira (Commented) (JIRA)" <ji...@apache.org> on 2011/11/04 15:01:01 UTC

[jira] [Commented] (BOOKKEEPER-105) A Bookkeeper can only open one LedgerHandle to a specific ledger at a time, if it expects them to work

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

Flavio Junqueira commented on BOOKKEEPER-105:
---------------------------------------------

Ivan, Is there a use case for this or you're simply planning on preventing such cases from happening by failing one call to open?
                
> A Bookkeeper can only open one LedgerHandle to a specific ledger at a time, if it expects them to work
> ------------------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-105
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-105
>             Project: Bookkeeper
>          Issue Type: Bug
>            Reporter: Ivan Kelly
>
> If you open two ledger handles pointing to the same ledger, using the same client, you will not be able to read from both. This is due to them sharing PerChannelBookieClient instances. PerChannelBookieClient has a member 
> {code}
>     ConcurrentHashMap<CompletionKey, ReadCompletion> readCompletions = new ConcurrentHashMap<CompletionKey, ReadCompletion>();
> {code}
> where CompletionKey is the ledgerId and entryId. If both LedgerHandles try to read the same entryId, they'll override each other on this hashmap.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira