You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Mukul Kumar Singh (JIRA)" <ji...@apache.org> on 2018/01/01 07:42:02 UTC

[jira] [Created] (RATIS-182) Leader should wait for the log entries to be appended and synced

Mukul Kumar Singh created RATIS-182:
---------------------------------------

             Summary: Leader should wait for the log entries to be appended and synced
                 Key: RATIS-182
                 URL: https://issues.apache.org/jira/browse/RATIS-182
             Project: Ratis
          Issue Type: Bug
            Reporter: Mukul Kumar Singh
            Assignee: Mukul Kumar Singh


Leader currently doesn't wait for the transaction to be appended to the log. This can lead to a situation where {{applyTransaction}} can be called before {{writeStateMachineData}} finishes.

{code}
  public long append(long term, TransactionContext operation,
      ClientId clientId, long callId) throws StateMachineException {
...
...
...
      appendEntry(e) <---- This should be synced
      operation.setLogEntry(e);
      return nextIndex;
    }
  }
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)