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

morningman 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 e138c3e25b0 [Fix](Repository)Handle non-StorageException errors in 
Storage parameter validation (#56929)
e138c3e25b0 is described below

commit e138c3e25b04c70031b8a028fd8e8752f3d08486
Author: Calvin Kirs <[email protected]>
AuthorDate: Wed Oct 15 23:40:41 2025 +0800

    [Fix](Repository)Handle non-StorageException errors in Storage parameter 
validation (#56929)
    
    Currently, during Storage parameter validation, some unexpected
    exceptions (e.g., IllegalArgumentException) may be thrown in addition to
    StorageException.
    This PR ensures that such non-StorageException errors are properly
    caught and handled, preventing unexpected crashes and improving
    robustness.
---
 .../main/java/org/apache/doris/backup/Repository.java   | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/backup/Repository.java 
b/fe/fe-core/src/main/java/org/apache/doris/backup/Repository.java
index 90dd3f3355f..269417a307a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/backup/Repository.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/backup/Repository.java
@@ -29,9 +29,7 @@ import org.apache.doris.common.io.Text;
 import org.apache.doris.common.io.Writable;
 import org.apache.doris.common.util.PrintableMap;
 import org.apache.doris.common.util.TimeUtils;
-import org.apache.doris.datasource.property.storage.BrokerProperties;
 import org.apache.doris.datasource.property.storage.StorageProperties;
-import 
org.apache.doris.datasource.property.storage.exception.StoragePropertiesException;
 import org.apache.doris.fs.FileSystemFactory;
 import org.apache.doris.fs.PersistentFileSystem;
 import org.apache.doris.fs.remote.BrokerFileSystem;
@@ -47,6 +45,7 @@ import com.google.common.base.Strings;
 import com.google.common.collect.Lists;
 import com.google.gson.annotations.SerializedName;
 import org.apache.commons.codec.digest.DigestUtils;
+import org.apache.commons.lang3.exception.ExceptionUtils;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.json.simple.JSONObject;
@@ -204,11 +203,15 @@ public class Repository implements Writable, 
GsonPostProcessable {
         try {
             StorageProperties storageProperties = 
StorageProperties.createPrimary(this.fileSystem.properties);
             this.fileSystem = FileSystemFactory.get(storageProperties);
-        } catch (StoragePropertiesException exception) {
-            LOG.warn("Failed to create file system for repository: {}, error: 
{}, roll back to broker"
-                    + " filesystem", name, exception.getMessage());
-            BrokerProperties brokerProperties = 
BrokerProperties.of(this.fileSystem.name, this.fileSystem.properties);
-            this.fileSystem = FileSystemFactory.get(brokerProperties);
+        } catch (RuntimeException exception) {
+            LOG.warn("Failed to create file system from properties, error msg 
{}",
+                    ExceptionUtils.getRootCause(exception), exception);
+            throw new IllegalStateException(
+                    "Failed to initialize file system due to incompatible 
configuration with the current version. "
+                            + "This may be caused by a change in property 
formats or deprecated settings. "
+                            + "Please verify your configuration and ensure it 
matches the "
+                            + "new version requirements. error msg: "
+                            + ExceptionUtils.getRootCause(exception), 
exception);
         }
     }
 


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

Reply via email to