LiuJinghao created RATIS-1462:
---------------------------------

             Summary: RaftServer started failed when rpc timeout use different 
unit
                 Key: RATIS-1462
                 URL: https://issues.apache.org/jira/browse/RATIS-1462
             Project: Ratis
          Issue Type: Bug
          Components: common
            Reporter: LiuJinghao


{code:java}
// set timeount of rpc use different unit. 
// we noticed  15 seconds < 1 minute
RaftServerConfigKeys.Rpc.setTimeoutMax(properties, TimeDuration.ONE_MINUTE);
RaftServerConfigKeys.Rpc.setTimeoutMin(properties, TimeDuration.valueOf(15, 
TimeUnit.SECONDS)); {code}
Init DivisionPropertiesImpl failed: 

Exception in thread "main" java.io.IOException: 
java.lang.IllegalStateException: rpcTimeoutMax = 1min < rpcTimeoutMin = 15s
    at org.apache.ratis.util.IOUtils.asIOException(IOUtils.java:56)
    at org.apache.ratis.util.IOUtils.toIOException(IOUtils.java:61)
    at org.apache.ratis.util.IOUtils.getFromFuture(IOUtils.java:71)
    at 
org.apache.ratis.server.impl.RaftServerProxy.getImpls(RaftServerProxy.java:354)
    at 
org.apache.ratis.server.impl.RaftServerProxy.start(RaftServerProxy.java:371)
Caused by: java.lang.IllegalStateException: rpcTimeoutMax = 1min < 
rpcTimeoutMin = 15s
    at org.apache.ratis.util.Preconditions.assertTrue(Preconditions.java:60)
    at 
org.apache.ratis.server.impl.DivisionPropertiesImpl.<init>(DivisionPropertiesImpl.java:35)
    at 
org.apache.ratis.server.impl.RaftServerImpl.<init>(RaftServerImpl.java:190)
    at 
org.apache.ratis.server.impl.RaftServerProxy.lambda$newRaftServerImpl$4(RaftServerProxy.java:266)
    at 
java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604)
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to