runzhiwang opened a new pull request #83:
URL: https://github.com/apache/incubator-ratis/pull/83


   Why WatchRequestTests.testWatchRequestClientTimeout failed.
   The test try to watch a log index which will never be committed, so client 
can not receive reply, and connection closed throw AlreadyClosedException, 
trigger TimeoutIOException.
   
   But when throw AlreadyClosedException, suggested new leader is null, because 
connection has been closed, so RaftClientImpl::handleIOException will [random 
select](https://github.com/apache/incubator-ratis/blob/master/ratis-client/src/main/java/org/apache/ratis/client/impl/RaftClientImpl.java#L418)
 a new leader, so it maybe sometimes throw NotLeaderException rather than 
TimeoutIOException.
   
![企业微信截图_9fed55fa-5428-4ab2-a82f-f637791e9862](https://user-images.githubusercontent.com/51938049/80779794-49a78e00-8b9f-11ea-96ec-a60c86ec6265.png)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to