This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch branch-3.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push: new 4d60b9769d8 branch-3.0: [fix](binlog) Record rollup index info for alterJob binlog #50850, #50337 (#50873) 4d60b9769d8 is described below commit 4d60b9769d855be6a6bea3fb86239b46ba960ea4 Author: walter <maoch...@selectdb.com> AuthorDate: Wed May 14 20:54:54 2025 +0800 branch-3.0: [fix](binlog) Record rollup index info for alterJob binlog #50850, #50337 (#50873) cherry pick from #50850, #50337 --------- Co-authored-by: Uniqueyou <wangyix...@selectdb.com> --- .../main/java/org/apache/doris/alter/RollupJobV2.java | 16 ++++++++++++++++ .../java/org/apache/doris/binlog/AlterJobRecord.java | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/fe/fe-core/src/main/java/org/apache/doris/alter/RollupJobV2.java b/fe/fe-core/src/main/java/org/apache/doris/alter/RollupJobV2.java index 54b62041889..e5d97d1f97b 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/alter/RollupJobV2.java +++ b/fe/fe-core/src/main/java/org/apache/doris/alter/RollupJobV2.java @@ -189,6 +189,22 @@ public class RollupJobV2 extends AlterJobV2 implements GsonPostProcessable { this.storageFormat = storageFormat; } + public long getRollupIndexId() { + return rollupIndexId; + } + + public String getRollupIndexName() { + return rollupIndexName; + } + + public long getBaseIndexId() { + return baseIndexId; + } + + public String getBaseIndexName() { + return baseIndexName; + } + protected void initAnalyzer() throws AnalysisException { ConnectContext connectContext = new ConnectContext(); Database db; diff --git a/fe/fe-core/src/main/java/org/apache/doris/binlog/AlterJobRecord.java b/fe/fe-core/src/main/java/org/apache/doris/binlog/AlterJobRecord.java index 51d11035300..a30545272c1 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/binlog/AlterJobRecord.java +++ b/fe/fe-core/src/main/java/org/apache/doris/binlog/AlterJobRecord.java @@ -18,6 +18,7 @@ package org.apache.doris.binlog; import org.apache.doris.alter.AlterJobV2; +import org.apache.doris.alter.RollupJobV2; import org.apache.doris.alter.SchemaChangeJobV2; import org.apache.doris.persist.gson.GsonUtils; @@ -42,8 +43,18 @@ public class AlterJobRecord { private AlterJobV2.JobState jobState; @SerializedName(value = "rawSql") private String rawSql; + // for schema change @SerializedName(value = "iim") private Map<Long, Long> indexIdMap; + // for rollup + @SerializedName(value = "rollupIndexId") + private long rollupIndexId; + @SerializedName(value = "rollUpIndexName") + private String rollUpIndexName; + @SerializedName(value = "baseIndexId") + private long baseIndexId; + @SerializedName(value = "baseIndexName") + private String baseIndexName; public AlterJobRecord(AlterJobV2 job) { this.type = job.getType(); @@ -55,6 +66,12 @@ public class AlterJobRecord { this.rawSql = job.getRawSql(); if (type == AlterJobV2.JobType.SCHEMA_CHANGE && job instanceof SchemaChangeJobV2) { this.indexIdMap = ((SchemaChangeJobV2) job).getIndexIdMap(); + } else if (type == AlterJobV2.JobType.ROLLUP && job instanceof RollupJobV2) { + RollupJobV2 rollupJob = (RollupJobV2) job; + this.rollupIndexId = rollupJob.getRollupIndexId(); + this.rollUpIndexName = rollupJob.getRollupIndexName(); + this.baseIndexId = rollupJob.getBaseIndexId(); + this.baseIndexName = rollupJob.getBaseIndexName(); } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org