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

RaftLog is accessed by LeaderElection after closed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.3.0
    • server
    • None

    Description

      IllegalArgumentException: SegmentedRaftLog is expected to be opened but it is CLOSED

      Exception in thread "Thread-429" java.lang.IllegalArgumentException: a790aa85-94ee-4627-a474-37d60022f180-SegmentedRaftLog is expected to be opened but it is CLOSED
              at org.apache.ratis.util.OpenCloseState.assertOpen(OpenCloseState.java:63)
              at org.apache.ratis.server.storage.RaftLog.checkLogState(RaftLog.java:88)
              at org.apache.ratis.server.storage.SegmentedRaftLog.getLastEntryTermIndex(SegmentedRaftLog.java:246)
              at org.apache.ratis.server.storage.RaftLog.getNextIndex(RaftLog.java:137)
              at org.apache.ratis.server.impl.LeaderState.<init>(LeaderState.java:208)
              at org.apache.ratis.server.impl.RoleInfo.startLeaderState(RoleInfo.java:90)
              at org.apache.ratis.server.impl.RaftServerImpl.changeToLeader(RaftServerImpl.java:324)
              at org.apache.ratis.server.impl.LeaderElection.askForVotes(LeaderElection.java:162)
              at org.apache.ratis.server.impl.LeaderElection.run(LeaderElection.java:102)
      Caused by: org.apache.ratis.util.OpenCloseState$CloseTrace: Close a790aa85-94ee-4627-a474-37d60022f180-SegmentedRaftLog
              at org.apache.ratis.util.OpenCloseState.lambda$close$1(OpenCloseState.java:109)
              at java.util.concurrent.atomic.AtomicReference.getAndUpdate(AtomicReference.java:160)
              at org.apache.ratis.util.OpenCloseState.close(OpenCloseState.java:109)
              at org.apache.ratis.server.storage.RaftLog.close(RaftLog.java:398)
              at org.apache.ratis.server.storage.SegmentedRaftLog.close(SegmentedRaftLog.java:406)
              at org.apache.ratis.server.impl.ServerState.close(ServerState.java:389)
              at org.apache.ratis.server.impl.RaftServerImpl.lambda$shutdown$3(RaftServerImpl.java:256)
              at org.apache.ratis.util.LifeCycle.checkStateAndClose(LifeCycle.java:220)
              at org.apache.ratis.server.impl.RaftServerImpl.shutdown(RaftServerImpl.java:233)
              at org.apache.ratis.server.impl.RaftServerProxy$ImplMap.lambda$close$0(RaftServerProxy.java:110)
              ...
              at org.apache.ratis.server.impl.RaftServerProxy$ImplMap.close(RaftServerProxy.java:110)
              at org.apache.ratis.server.impl.RaftServerProxy.lambda$close$4(RaftServerProxy.java:307)
              at org.apache.ratis.util.LifeCycle.checkStateAndClose(LifeCycle.java:220)
              at org.apache.ratis.server.impl.RaftServerProxy.close(RaftServerProxy.java:305)
              ...
      

      Attachments

        1. r503_20190322.patch
          21 kB
          Tsz-wo Sze
        2. r503_20190323.patch
          27 kB
          Tsz-wo Sze
        3. r503_20190323b.patch
          27 kB
          Tsz-wo Sze
        4. r503_20190324.patch
          27 kB
          Tsz-wo Sze
        5. r503_20190328b.patch
          28 kB
          Tsz-wo Sze

        Issue Links

          Activity

            People

              szetszwo Tsz-wo Sze
              msingh Mukul Kumar Singh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: