[scn] fix failure of mittest after refresh feature scn

This commit is contained in:
obdev
2022-11-28 01:46:42 +00:00
committed by ob-robot
parent 49a02f3304
commit 54b64a7263
1898 changed files with 255804 additions and 280809 deletions

View File

@ -19,7 +19,7 @@ namespace common
const char *OB_STORAGE_ACCESS_TYPES_STR[] = {"reader", "overwriter", "appender", "random_write"};
ObObjectDevice::ObObjectDevice() : oss_account_(), base_info_(NULL), is_started_(false), lock_()
ObObjectDevice::ObObjectDevice() : oss_account_(), cos_base_(), base_info_(NULL), is_started_(false), lock_()
{
}
@ -72,6 +72,11 @@ int ObObjectDevice::start(const ObIODOpts &opts)
OB_LOG(WARN, "fail to init oss base", K(storage_info) ,K(ret));
}
base_info_ = (void*)&oss_account_;
} else if (OB_STORAGE_COS == device_type_) {
if (OB_FAIL(cos_base_.build_account(storage_info))) {
OB_LOG(WARN, "fail to build cos account", K(storage_info), K(ret));
}
base_info_ = (void*)&cos_base_;
} else if (OB_STORAGE_FILE == device_type_) {
//do nothing
base_info_ = NULL;
@ -229,8 +234,9 @@ int ObObjectDevice::open_for_appender(const char *pathname, ObIODOpts *opts, voi
OB_LOG(WARN, "Invalid append strategy!", KCSTRING(append_strategy), K(ret));
}
param.strategy_ = strategy;
param.version_param_.version_ = append_version;
if (-1 != append_version) {
param.version_param_.version_ = append_version;
param.version_param_.open_object_version_ = true;
if (param.version_param_.version_ <= 0) {
ret = OB_INVALID_ARGUMENT;