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

liuyang commented on BOOKKEEPER-408:
------------------------------------

The warn log show that may be ReadTimeOutException, I am looking the reason why 
could not connect bookkeeper server frequently? 

/**
* the partial log information about the error
*/
WARN  - [Hashed wheel timer #4:PerChannelBookieClient@488] - Couldn't connect 
to bookkeeper server
     org.jboss.netty.handler.timeout.ReadTimeoutException
        at 
org.jboss.netty.handler.timeout.ReadTimeoutHandler.<clinit>(ReadTimeoutHandler.java:84)
        at 
org.apache.bookkeeper.proto.PerChannelBookieClient.getPipeline(PerChannelBookieClient.java:450)
        at 
org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:212)
        at 
org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188)
        at 
org.apache.bookkeeper.proto.PerChannelBookieClient.connect(PerChannelBookieClient.java:135)
        at 
org.apache.bookkeeper.proto.PerChannelBookieClient.connectIfNeededAndDoOp(PerChannelBookieClient.java:203)
        at 
org.apache.bookkeeper.proto.BookieClient.addEntry(BookieClient.java:108)
        at 
org.apache.bookkeeper.client.PendingAddOp.sendWriteRequest(PendingAddOp.java:76)
        at 
org.apache.bookkeeper.client.PendingAddOp.initiate(PendingAddOp.java:117)
        at 
org.apache.bookkeeper.client.LedgerHandle$2.safeRun(LedgerHandle.java:539)
        at org.apache.bookkeeper.util.SafeRunnable.run(SafeRunnable.java:31)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)

                
> BookieReadWriteTest will enter the endless loop and will not leave out
> ----------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-408
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-408
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.1.0
>         Environment: SUSE System
> ZooKeeper server
> three BookKeepers
>            Reporter: liuyang
>
> When I run the tests of BookKeeper, I found that the test running forever and 
> cannot be finished. The log has the exception that is 
> "junit.framework.AssertionFailedError: Return code is not OK: -6". 
> I thought this issuse might be come from the synchronization mechanism used 
> by the BookieReadWriteTest.
> for example in BookieReadWriteTest.TestReadWriteAsyncSingleClient()
> 1. when called the function lh.asyncAddEntry(entry.array(), this ,sync), the 
> call back function is addComplete(int, LedgerHandle, long, Object)
> 2. we can see that in addComplete(..) the function will be fail when rc != 
> BKException.Code.OK, and the x.counter++ will not be called never.
> 3. we assume that the function addComplete(..) is fail. so, in 
> TestReadWriteAsyncSingleClient(), the while loop enter endless loop because 
> sync.counter < numEntriesToWrite is right forever.

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