This is an automated email from the ASF dual-hosted git repository.

morrysnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 846138c152a [fix](mtmv)After failure, one should quickly return to 
avoid repeated failures (#44174)
846138c152a is described below

commit 846138c152aa4225d31b1e0f0f2b694e105047a6
Author: zhangdong <[email protected]>
AuthorDate: Mon Nov 18 20:32:11 2024 +0800

    [fix](mtmv)After failure, one should quickly return to avoid repeated 
failures (#44174)
    
    ### What problem does this PR solve?
    
    BuildContext may fail, and we are currently ignoring this error, which
    may result in repeated failures. We should quickly return
    
    Problem Summary:
    BuildContext may fail, and we are currently ignoring this error, which
    may result in repeated failures. We should quickly return
    
    ### Release note
    
    BuildContext may fail, and we are currently ignoring this error, which
    may result in repeated failures. We should quickly return
---
 .../src/main/java/org/apache/doris/mtmv/MTMVRewriteUtil.java   | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVRewriteUtil.java 
b/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVRewriteUtil.java
index 5e17673a068..7b7d743a36b 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVRewriteUtil.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVRewriteUtil.java
@@ -64,10 +64,16 @@ public class MTMVRewriteUtil {
                 res.add(partition);
                 continue;
             }
-            try {
-                if (refreshContext == null) {
+            if (refreshContext == null) {
+                try {
                     refreshContext = MTMVRefreshContext.buildContext(mtmv);
+                } catch (AnalysisException e) {
+                    LOG.warn("buildContext failed", e);
+                    // After failure, one should quickly return to avoid 
repeated failures
+                    return res;
                 }
+            }
+            try {
                 if (MTMVPartitionUtil.isMTMVPartitionSync(refreshContext, 
partition.getName(),
                         mtmvRelation.getBaseTablesOneLevel(),
                         Sets.newHashSet())) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to