[ 
https://issues.apache.org/jira/browse/RATIS-867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shashikant Banerjee resolved RATIS-867.
---------------------------------------
    Fix Version/s: 0.6.0
       Resolution: Fixed

> TestMetaServer#testListLogs
> ---------------------------
>
>                 Key: RATIS-867
>                 URL: https://issues.apache.org/jira/browse/RATIS-867
>             Project: Ratis
>          Issue Type: Sub-task
>            Reporter: Shashikant Banerjee
>            Assignee: runzhiwang
>            Priority: Major
>             Fix For: 0.6.0
>
>         Attachments: image.png
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
>  
> The issue was observed here:
> [https://builds.apache.org/job/PreCommit-RATIS-Build/1299/testReport/org.apache.ratis.logservice.server/TestMetaServer/testListLogs/]
> {code:java}
> ava.lang.AssertionError: expected:<19> but was:<20>
>       at 
> org.apache.ratis.logservice.server.TestMetaServer.testJMXCount(TestMetaServer.java:339)
>       at 
> org.apache.ratis.logservice.server.TestMetaServer.testListLogs(TestMetaServer.java:331)
> {code}
>  
> The reason is:
> 1. when create log, it will call 
> [RaftClientImpl::sendRequestWithRetry|https://github.com/apache/incubator-ratis/blob/master/ratis-client/src/main/java/org/apache/ratis/client/impl/RaftClientImpl.java#L285],
>  if throw TimeoutIOException, it will retry at [final RaftClientReply reply = 
> sendRequest(request)|https://github.com/apache/incubator-ratis/blob/master/ratis-client/src/main/java/org/apache/ratis/client/impl/RaftClientImpl.java#L296],
>  So JMXCount will increase many times at [timerContext = 
> metricRegistry.timer(type.name()).time()|https://github.com/apache/incubator-ratis/blob/master/ratis-logservice/src/main/java/org/apache/ratis/logservice/server/MetaStateMachine.java#L224]
>  when retry happens.  Then JMXCount i.e. 20 not equal to createCount i.e. 19
> 2. The TimeoutIOException is as follows:
> {code:java}
> org.apache.ratis.protocol.TimeoutIOException: deadline exceeded after 
> 2.999977899s. [buffered_nanos=1460409, remote_addr=localhost/127.0.0.1:9001]
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to