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

Sijie Guo commented on BOOKKEEPER-49:
-------------------------------------

thanks [~mmerli]. this patch is actually simple and straightforward. I am just 
a bit worried about the synchronization. seems that all threads need to 
synchronize on the readCompletions, I am not sure is the overhead acceptable.

for long term, I think we need to introduce TxnId in bookie request.
                
> bookkeeper - parallel async read same entry of same ledger will fail
> --------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-49
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-49
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-client
>    Affects Versions: 4.0.0, 4.1.0
>            Reporter: Sijie Guo
>            Assignee: Sijie Guo
>             Fix For: 4.3.0
>
>         Attachments: 
> 0001-BOOKKEEPER-49-bookkeeper-parallel-async-read-same-en.patch
>
>
> all ledgers shared a PerChannelBookieClient. 
> PerChannelBookieClient put all the read requests in a 
> ConcurrentHashMap<CompletionKey, ReadCompletion> map called readCompletions, 
> which is indexed by CompletionKey. If two read requests have same entryId and 
> same ledgerId, they have the same CompletionKey, the latter one will 
> overwrite the previous one. So a read request's callback will not be invoked.
> we may need to chain the callbacks for same completion keys.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to