hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java
@Override
  public CompletableFuture<Message> writeStateMachineData(LogEntryProto entry) {
    try {
      final ContainerCommandRequestProto requestProto =
          getRequestProto(entry.getSmLogEntry().getStateMachineData());
      Type cmdType = requestProto.getCmdType();
      switch (cmdType) {
      case CreateContainer:
        return handleCreateContainer(requestProto);
      case WriteChunk:
        return handleWriteChunk(requestProto, entry.getIndex());
      default:
        throw new IllegalStateException("Cmd Type:" + cmdType
            + " should not have state machine data");
      }
    } catch (IOException e) {
      return completeExceptionally(e);
    }
  }
/*
   * writeStateMachineData calls are not synchronized with each other
   * and also with applyTransaction.
   */
writeStateMachineData calls are not synchronized with each other
and also with applyTransaction.
writeStateMachineData calls are not synchronized with each other and also with applyTransaction .
@Override
  public CompletableFuture<Message> writeStateMachineData(LogEntryProto entry) {
    try {
      final ContainerCommandRequestProto requestProto =
          getRequestProto(entry.getSmLogEntry().getStateMachineData());
      Type cmdType = requestProto.getCmdType();
      switch (cmdType) {
      case CreateContainer:
        return handleCreateContainer(requestProto);
      case WriteChunk:
        return handleWriteChunk(requestProto, entry.getIndex());
      default:
        throw new IllegalStateException("Cmd Type:" + cmdType
            + " should not have state machine data");
      }
    } catch (IOException e) {
      return completeExceptionally(e);
    }
  }
@ Override public CompletableFuture < Message > writeStateMachineData ( LogEntryProto entry ) { try { final ContainerCommandRequestProto requestProto = getRequestProto ( entry . getSmLogEntry ( ) . getStateMachineData ( ) ) ; Type cmdType = requestProto . getCmdType ( ) ; switch ( cmdType ) { case CreateContainer : return handleCreateContainer ( requestProto ) ; case WriteChunk : return handleWriteChunk ( requestProto , entry . getIndex ( ) ) ; default : throw new IllegalStateException ( "Cmd Type:" + cmdType + " should not have state machine data" ) ; } } catch ( IOException e ) { return completeExceptionally ( e ) ; } }
writeStateMachineData calls are not synchronized with each other
 and also with applyTransaction.
writeStateMachineData calls are not synchronized with each other and also with applyTransaction .