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