You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Tsz-wo Sze (Jira)" <ji...@apache.org> on 2021/12/08 10:51:00 UTC

[jira] [Resolved] (RATIS-1462) RaftServer started failed when rpc timeout use different unit

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

Tsz-wo Sze resolved RATIS-1462.
-------------------------------
    Fix Version/s: 2.3.0
       Resolution: Fixed

I have merged the pull request.  Thanks, [~LiuJinghao]!

> 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
>    Affects Versions: 2.0.0, 2.1.0, 2.2.0
>            Reporter: Liu Jinghao
>            Assignee: Liu Jinghao
>            Priority: Critical
>             Fix For: 2.3.0
>
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> {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)