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

zclll 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 8c92222d138 [Fix](dictionary) Avoid dictionary hang because of 
exception (#55609)
8c92222d138 is described below

commit 8c92222d1384e1fbbbe49d3806f7eef61099b856
Author: zclllyybb <[email protected]>
AuthorDate: Wed Sep 3 18:48:48 2025 +0800

    [Fix](dictionary) Avoid dictionary hang because of exception (#55609)
    
    before if in some situations dictionary's dataLoad throws in unexpected
    position, dictionary may hang on wrong Loading status. now fixed.
---
 .../src/main/java/org/apache/doris/dictionary/DictionaryManager.java  | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/dictionary/DictionaryManager.java 
b/fe/fe-core/src/main/java/org/apache/doris/dictionary/DictionaryManager.java
index a24cbe1b20a..6bb2234fe8e 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/dictionary/DictionaryManager.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/dictionary/DictionaryManager.java
@@ -372,10 +372,14 @@ public class DictionaryManager extends MasterDaemon 
implements Writable {
     private void submitDataLoad(Dictionary dictionary, boolean adaptiveLoad) {
         LOG.info("Submit dictionary {} refresh task, it's {} now", 
dictionary.getName(), dictionary.getStatus());
         executor.execute(() -> {
+            Dictionary.DictionaryStatus oldStatus = dictionary.getStatus();
             try {
                 dataLoad(null, dictionary, adaptiveLoad);
             } catch (Exception e) {
+                // some exception will leak to here. just revert status and 
wait next schedule.
                 LOG.warn("Failed to load dictionary " + dictionary.getName(), 
e);
+                dictionary.trySetStatus(oldStatus);
+                dictionary.setLastUpdateResult(e.getMessage());
             }
         });
     }


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

Reply via email to