yiguolei commented on a change in pull request #8030: URL: https://github.com/apache/incubator-doris/pull/8030#discussion_r805174213
########## File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java ########## @@ -2160,43 +2128,19 @@ public long saveAlterJob(CountingDataOutputStream dos, long checksum) throws IOE } public long saveAlterJob(CountingDataOutputStream dos, long checksum, JobType type) throws IOException { - Map<Long, AlterJob> alterJobs = null; - ConcurrentLinkedQueue<AlterJob> finishedOrCancelledAlterJobs = null; Map<Long, AlterJobV2> alterJobsV2 = Maps.newHashMap(); - if (type == JobType.ROLLUP) { - alterJobs = this.getRollupHandler().unprotectedGetAlterJobs(); - finishedOrCancelledAlterJobs = this.getRollupHandler().unprotectedGetFinishedOrCancelledAlterJobs(); - alterJobsV2 = this.getRollupHandler().getAlterJobsV2(); - } else if (type == JobType.SCHEMA_CHANGE) { - alterJobs = this.getSchemaChangeHandler().unprotectedGetAlterJobs(); - finishedOrCancelledAlterJobs = this.getSchemaChangeHandler().unprotectedGetFinishedOrCancelledAlterJobs(); - alterJobsV2 = this.getSchemaChangeHandler().getAlterJobsV2(); - } else if (type == JobType.DECOMMISSION_BACKEND) { - alterJobs = this.getClusterHandler().unprotectedGetAlterJobs(); - finishedOrCancelledAlterJobs = this.getClusterHandler().unprotectedGetFinishedOrCancelledAlterJobs(); - } - // alter jobs - int size = alterJobs.size(); + // alter jobs == 0 + // If the FE version upgrade from old version, if it have alter jobs, the FE will failed during start process + // the number of old version alter jobs has to be 0 + int size = 0; Review comment: Need write size. When use this fe version to replace old fe version, the old fe version does not have any old alter jobs, so that the size == 0. And the new fe version will load size and find it is 0, so that it will skip to load old alter jobs. If not write size = 0, the new fe version dump the image and try to restart it will fail because it will load size... -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org