Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions fe/fe-core/src/main/java/org/apache/doris/backup/Repository.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
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;
Expand All @@ -47,6 +45,7 @@
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;
Expand Down Expand Up @@ -204,11 +203,15 @@ public void gsonPostProcess() {
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);
}
}

Expand Down
Loading