You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2022/05/06 09:20:50 UTC
[incubator-doris] 11/11: [fixbug][metadata] catalog could not load from image (#9364)
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch dev-1.0.1
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
commit 973153fe9be05e28987d76520b9282bf77ce57db
Author: yiguolei <67...@qq.com>
AuthorDate: Thu May 5 09:58:01 2022 +0800
[fixbug][metadata] catalog could not load from image (#9364)
* [fixbug][catalog] catalog could not load from image
* fix ut failed
Co-authored-by: yiguolei <yi...@gmail.com>
---
fe/fe-core/src/main/java/org/apache/doris/alter/AlterJobV2.java | 4 +++-
fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java | 3 +++
2 files changed, 6 insertions(+), 1 deletion(-)
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 764a0b0ae8..1d0f69f704 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 abstract class AlterJobV2 implements Writable {
}
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 a6e658e535..7621d0008c 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
@@ -2114,6 +2114,9 @@ public class Catalog {
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());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org