diff --git a/fe/fe-core/src/main/java/org/apache/doris/alter/AlterJobV2.java b/fe/fe-core/src/main/java/org/apache/doris/alter/AlterJobV2.java index 764a0b0ae853bd..1d0f69f7044bd3 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/alter/AlterJobV2.java +++ b/fe/fe-core/src/main/java/org/apache/doris/alter/AlterJobV2.java @@ -58,7 +58,9 @@ public boolean isFinalState() { } public enum JobType { - ROLLUP, SCHEMA_CHANGE + // Must not remove it or change the order, because catalog depend on it to traverse the image + // and load meta data + ROLLUP, SCHEMA_CHANGE, DECOMMISSION_BACKEND } @SerializedName(value = "type") diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java index fa7fdc757216ae..df61e2b18af2dc 100755 --- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java +++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java @@ -2113,6 +2113,9 @@ public long saveAlterJob(CountingDataOutputStream dos, long checksum, JobType ty alterJobsV2 = this.getMaterializedViewHandler().getAlterJobsV2(); } else if (type == JobType.SCHEMA_CHANGE) { alterJobsV2 = this.getSchemaChangeHandler().getAlterJobsV2(); + } else if (type == JobType.DECOMMISSION_BACKEND) { + // Load alter job need decommission backend type to load image + alterJobsV2 = Maps.newHashMap(); } else { throw new IOException("Invalid alter job type: " + type.name()); }