presto-main/src/main/java/io/prestosql/execution/StageStateMachine.java/StageStateMachine/transitionToRunning
class StageStateMachine:    public boolean transitionToRunning()
    {
        return stageState.setIf(RUNNING, currentState -> currentState != RUNNING && !currentState.isDone());
    }