[FEAT MERGE] Backup support AWS S3
Co-authored-by: xuhuleon <xuhuleon@qq.com>
This commit is contained in:
@ -50,6 +50,8 @@ int ObDeviceManager::init_devices_env()
|
||||
OB_LOG(WARN, "fail to init oss storage", K(ret));
|
||||
} else if (OB_FAIL(init_cos_env())) {
|
||||
OB_LOG(WARN, "fail to init cos storage", K(ret));
|
||||
} else if (OB_FAIL(init_s3_env())) {
|
||||
OB_LOG(WARN, "fail to init s3 storage", K(ret));
|
||||
}
|
||||
}
|
||||
|
||||
@ -84,6 +86,7 @@ void ObDeviceManager::destroy()
|
||||
allocator_.reset();
|
||||
fin_oss_env();
|
||||
fin_cos_env();
|
||||
fin_s3_env();
|
||||
is_init_ = false;
|
||||
device_count_ = 0;
|
||||
OB_LOG_RET(WARN, ret_dev, "release the init resource", K(ret_dev), K(ret_handle));
|
||||
@ -120,6 +123,10 @@ int parse_storage_info(common::ObString storage_type_prefix, ObIODevice*& device
|
||||
device_type = OB_STORAGE_COS;
|
||||
mem = allocator.alloc(sizeof(ObObjectDevice));
|
||||
if (NULL != mem) {new(mem)ObObjectDevice;}
|
||||
} else if (storage_type_prefix.prefix_match(OB_S3_PREFIX)) {
|
||||
device_type = OB_STORAGE_S3;
|
||||
mem = allocator.alloc(sizeof(ObObjectDevice));
|
||||
if (NULL != mem) {new(mem)ObObjectDevice;}
|
||||
} else {
|
||||
ret = OB_INVALID_BACKUP_DEST;
|
||||
OB_LOG(WARN, "invaild device name info!", K(storage_type_prefix));
|
||||
|
||||
Reference in New Issue
Block a user