CalvinKirs commented on code in PR #51599:
URL: https://github.com/apache/doris/pull/51599#discussion_r2137294243
##########
fe/fe-core/src/main/java/org/apache/doris/backup/Repository.java:
##########
@@ -241,10 +242,13 @@ public Status alterRepositoryS3Properties(Map<String,
String> properties) {
@Override
public void gsonPostProcess() {
- StorageBackend.StorageType type = StorageBackend.StorageType.BROKER;
- if (!type.equals(StorageBackend.StorageType.BROKER)) {
+ 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());
+ this.fileSystem = FileSystemFactory.get(this.fileSystem.name,
this.fileSystem.properties);
}
Review Comment:
We will refactor this interface within the unified FS Factory method. In
fact, we need a way to determine which types qualify as BrokerFS.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]