Code review comment: ```suggestion         analysisTaskInfoMap.put(analysisInfo.taskId, analysisInfo);         Env.getCurrentEnv().getEditLog().logCreateAnalysisTasks(analysisInfo); ```

Code under review:
public void updateTaskStatus(AnalysisInfo info, AnalysisState jobState, String message, long time) {
        if (analysisJobIdToTaskMap.get(info.jobId) == null) {
            return;
        }
        info.state = jobState;
        info.message = message;
        info.lastExecTimeInMs = time;
        logCreateAnalysisTask(info);

        AnalysisInfo job = analysisJobInfoMap.get(info.jobId);
        job.lastExecTimeInMs = time;
        if (info.state.equals(AnalysisState.RUNNING) && !job.state.equals(AnalysisState.PENDING)) {
            job.state = AnalysisState.RUNNING;
            Env.getCurrentEnv().getEditLog().logCreateAnalysisTasks(job);
        }
        boolean allFinished = true;
        boolean hasFailure = false;
        for (BaseAnalysisTask task : analysisJobIdToTaskMap.get(info.jobId).values()) {
            AnalysisInfo taskInfo = task.info;
            if (taskInfo.state.equals(AnalysisState.RUNNING) || taskInfo.state.equals(AnalysisState.PENDING)) {
                allFinished = false;
                break;
            }
            if (taskInfo.state.equals(AnalysisState.FAILED)) {
                hasFailure = true;
            }
        }
        if (allFinished) {
            if (hasFailure) {
                job.state = AnalysisState.FAILED;
                logCreateAnalysisJob(job);
            } else {
                job.state = AnalysisState.FINISHED;
                logCreateAnalysisJob(job);
            }
            analysisJobIdToTaskMap.remove(job.jobId);
        }
    }

Line commented on: break;

Revised code:
public void updateTaskStatus(AnalysisInfo info, AnalysisState jobState, String message, long time) {
        if (analysisJobIdToTaskMap.get(info.jobId) == null) {
            return;
        }
        info.state = jobState;
        info.message = message;
        info.lastExecTimeInMs = time;
        logCreateAnalysisTask(info);

        AnalysisInfo job = analysisJobInfoMap.get(info.jobId);
        job.lastExecTimeInMs = time;
        if (info.state.equals(AnalysisState.RUNNING) && !job.state.equals(AnalysisState.PENDING)) {
            job.state = AnalysisState.RUNNING;
            Env.getCurrentEnv().getEditLog().logCreateAnalysisTasks(job);
        }
        boolean allFinished = true;
        boolean hasFailure = false;
        for (BaseAnalysisTask task : analysisJobIdToTaskMap.get(info.jobId).values()) {
            AnalysisInfo taskInfo = task.info;
            if (taskInfo.state.equals(AnalysisState.RUNNING) || taskInfo.state.equals(AnalysisState.PENDING)) {
                allFinished = false;
                break;
            }
            if (taskInfo.state.equals(AnalysisState.FAILED)) {
                hasFailure = true;
            }
        }
        if (allFinished) {
            if (hasFailure) {
                job.state = AnalysisState.FAILED;
                logCreateAnalysisJob(job);
            } else {
                job.state = AnalysisState.FINISHED;
                logCreateAnalysisJob(job);
            }
            analysisJobIdToTaskMap.remove(job.jobId);
        }
    }