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

Sijie Guo edited comment on BOOKKEEPER-520 at 12/27/12 6:46 PM:
----------------------------------------------------------------

{quote}
The patch, however, does not really try to avoid the race itself, only its 
negative, which is not calling "lh.sendAddSuccessCallbacks()" for some entries.

I'm not entirely sure of why you're moving the execution of writeComplete and 
readEntryComplete to separate thread in BookieClient. Is this for performance 
or is it related to the bug?
{quote}

there are two races here.

1) writeComplete called in BookieClient due to channel could not be connected, 
is raced with successful writeComplete called in PerChannelBookieClient. I 
resolved it by submitting #writeComplete by ledger as what we did it in 
PerChannelBookieClient.

2) change ensemble decrement blockAddCompletions in different thread. a success 
complete should wait until ensemble changed. but after ensemble changed, there 
is no chance to trigger sendAddSuccessCallbacks. so I removed "if 
(lh.pendingAddOps.peek() == this) {" to trigger success callbacks.


                
      was (Author: hustlmsp):
    {quote}
The patch, however, does not really try to avoid the race itself, only its 
negative, which is not calling "lh.sendAddSuccessCallbacks()" for some entries.

I'm not entirely sure of why you're moving the execution of writeComplete and 
readEntryComplete to separate thread in BookieClient. Is this for performance 
or is it related to the bug?
{quote}

there are two races there.

1) writeComplete called in BookieClient due to channel could not be connected, 
is raced with successful writeComplete called in PerChannelBookieClient. I 
resolved it by submitting #writeComplete by ledger as what we did it in 
PerChannelBookieClient.

2) change ensemble decrement blockAddCompletions in different thread. a success 
complete should wait until ensemble changed. but after ensemble changed, there 
is no chance to trigger sendAddSuccessCallbacks. so I removed "if 
(lh.pendingAddOps.peek() == this) {" to trigger success callbacks.


                  
> BookieFailureTest hangs on precommit build
> ------------------------------------------
>
>                 Key: BOOKKEEPER-520
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-520
>             Project: Bookkeeper
>          Issue Type: Bug
>            Reporter: Ivan Kelly
>            Assignee: Sijie Guo
>             Fix For: 4.2.0
>
>         Attachments: 
> 0001-BOOKKEEPER-520-BookieFailureTest-hangs-on-precommit-.patch, 
> 0001-Fix-the-callback.patch, BOOKKEEPER-520.diff, BOOKKEEPER-520.diff, 
> BOOKKEEPER-520.diff, BOOKKEEPER-520.diff, BOOKKEEPER-520.diff, 
> BOOKKEEPER-520.diff, BOOKKEEPER-520.diff, BOOKKEEPER-520.diff, 
> BOOKKEEPER-520.diff, BOOKKEEPER-520.diff, bookkeeper-server.log, 
> org.apache.bookkeeper.test.BookieFailureTest-output-halt.txt, stack-trace.txt
>
>
> https://builds.apache.org/job/bookkeeper-trunk-precommit-build/142/

--
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