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

[Log Service] Writing data from Log Stream failing with IllegalStateException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.3.0
    • LogService
    • None

    Description

      Written an app to create multiple logs and write data to the logs. At some point of time writing to log failing with following error.

      2019-01-24 22:09:04 ERROR RaftServerImpl:1119 - localhost_9951: applyTransaction failed for index:1 proto:(t:1, i:1), STATEMACHINELOGENTRY, client-DE592625D102, cid=11
      2019-01-24 22:09:04 ERROR StateMachineUpdater:133 - Terminating with exit status 2: StateMachineUpdater-localhost_9951: the StateMachineUpdater hits Throwable
      java.lang.IllegalStateException: localhost_9951: Failed updateLastAppliedTermIndex: newTI = (t:1, i:1) < oldTI = (t:1, i:7)
      	at org.apache.ratis.util.Preconditions.assertTrue(Preconditions.java:72)
      	at org.apache.ratis.statemachine.impl.BaseStateMachine.updateLastAppliedTermIndex(BaseStateMachine.java:116)
      	at org.apache.ratis.logservice.server.LogStateMachine.processAppendRequest(LogStateMachine.java:324)
      	at org.apache.ratis.logservice.server.LogStateMachine.applyTransaction(LogStateMachine.java:356)
      	at org.apache.ratis.server.impl.RaftServerImpl.applyLogToStateMachine(RaftServerImpl.java:1116)
      	at org.apache.ratis.server.impl.StateMachineUpdater.run(StateMachineUpdater.java:169)
      	at java.lang.Thread.run(Thread.java:745)
      

      Getting this error just after writing few entries.

      Attachments

        1. RATIS-475-wip.patch
          6 kB
          Rajeshbabu Chintaguntla
        2. RATIS-475_v2.patch
          7 kB
          Rajeshbabu Chintaguntla

        Activity

          People

            rajeshbabu Rajeshbabu Chintaguntla
            rajeshbabu Rajeshbabu Chintaguntla
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: