Uploaded image for project: 'Ratis'
  1. Ratis
  2. RATIS-1462

RaftServer started failed when rpc timeout use different unit

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.0.0, 2.1.0, 2.2.0
    • 2.3.0
    • common
    • None

    Description

      // 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)); 

      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)

      Attachments

        Issue Links

          Activity

            People

              LiuJinghao Liu Jinghao
              LiuJinghao Liu Jinghao
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h