Skip to content

Commit

Permalink
roll back
Browse files Browse the repository at this point in the history
  • Loading branch information
zddr committed Nov 19, 2024
1 parent cd30e5c commit 0806273
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
3 changes: 1 addition & 2 deletions fe/fe-core/src/main/java/org/apache/doris/alter/Alter.java
Original file line number Diff line number Diff line change
Expand Up @@ -1022,8 +1022,7 @@ public void processAlterMTMV(AlterMTMV alterMTMV, boolean isReplay) {
mtmv.alterMvProperties(alterMTMV.getMvProperties());
break;
case ADD_TASK:
mtmv.addTaskResult(alterMTMV.getTask(), alterMTMV.getRelation(), alterMTMV.getPartitionSnapshots(),
isReplay);
mtmv.addTaskResult(alterMTMV.getTask(), alterMTMV.getRelation(), alterMTMV.getPartitionSnapshots());
break;
default:
throw new RuntimeException("Unknown type value: " + alterMTMV.getOpType());
Expand Down
10 changes: 3 additions & 7 deletions fe/fe-core/src/main/java/org/apache/doris/catalog/MTMV.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,19 +190,15 @@ public MTMVStatus alterStatus(MTMVStatus newStatus) {
}

public void addTaskResult(MTMVTask task, MTMVRelation relation,
Map<String, MTMVRefreshPartitionSnapshot> partitionSnapshots, boolean isReplay) {
Map<String, MTMVRefreshPartitionSnapshot> partitionSnapshots) {
MTMVCache mtmvCache = null;
boolean needUpdateCache = false;
if (task.getStatus() == TaskStatus.SUCCESS && !Env.isCheckpointThread()
&& !Config.enable_check_compatibility_mode) {
needUpdateCache = true;
try {
// The replay thread may not have initialized the catalog yet to avoid getting stuck due
// to connection issues such as S3, so it is directly set to null
if (!isReplay) {
// shouldn't do this while holding mvWriteLock
mtmvCache = MTMVCache.from(this, MTMVPlanUtil.createMTMVContext(this), true);
}
// shouldn't do this while holding mvWriteLock
mtmvCache = MTMVCache.from(this, MTMVPlanUtil.createMTMVContext(this), true);
} catch (Throwable e) {
mtmvCache = null;
LOG.warn("generate cache failed", e);
Expand Down

0 comments on commit 0806273

Please sign in to comment.