Do not report ERROR when sample rate equals 100

This commit is contained in:
ZenoWang
2024-02-06 14:49:31 +00:00
committed by ob-robot
parent 1f1d5c08ae
commit c8ef409bf3
3710 changed files with 486984 additions and 3083329 deletions

View File

@ -50,8 +50,6 @@ 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));
}
}
@ -86,7 +84,6 @@ 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));
@ -123,10 +120,6 @@ 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));
@ -167,7 +160,7 @@ int ObDeviceManager::alloc_device(ObDeviceInsInfo*& device_info,
}
if (-1 == avai_idx && -1 == last_no_ref_idx) {
OB_LOG(WARN, "devices too mang!", K(MAX_DEVICE_INSTANCE), KP(storage_info.ptr()), K(storage_type_prefix));
OB_LOG(WARN, "devices too mang!", K(MAX_DEVICE_INSTANCE), K(storage_info), K(storage_type_prefix));
//cannot insert into device manager
ret = OB_OUT_OF_ELEMENT;
} else {
@ -176,11 +169,9 @@ int ObDeviceManager::alloc_device(ObDeviceInsInfo*& device_info,
//erase from map
ObString old_key(device_ins_[last_no_ref_idx].storage_info_);
if (OB_FAIL(device_map_.erase_refactored(old_key))) {
OB_LOG(WARN, "fail to erase device from device map",
KP(old_key.ptr()), K(ret), KP(storage_info.ptr()), K(storage_type_prefix));
OB_LOG(WARN, "fail to erase device from device map", K(old_key), K(ret), K(storage_info), K(storage_type_prefix));
} else if (OB_FAIL(handle_map_.erase_refactored((int64_t)(device_ins_[last_no_ref_idx].device_)))) {
OB_LOG(WARN, "fail to erase device from handle map", K(ret),
K(device_ins_[last_no_ref_idx].device_), KP(storage_info.ptr()), K(storage_type_prefix));
OB_LOG(WARN, "fail to erase device from handle map", K(device_ins_[last_no_ref_idx].device_), K(ret), K(storage_info), K(storage_type_prefix));
} else {
/*free the resource*/
ObIODevice* del_device = device_ins_[last_no_ref_idx].device_;
@ -190,8 +181,7 @@ int ObDeviceManager::alloc_device(ObDeviceInsInfo*& device_info,
abort_unless(device_count_ == MAX_DEVICE_INSTANCE);
device_count_--;
avai_idx = last_no_ref_idx;
OB_LOG(INFO, "release one device for realloc another!",
KP(old_key.ptr()), KP(storage_info.ptr()), K(storage_type_prefix));
OB_LOG(INFO, "release one device for realloc another!", K(old_key), K(storage_info), K(storage_type_prefix));
}
}
@ -200,14 +190,11 @@ int ObDeviceManager::alloc_device(ObDeviceInsInfo*& device_info,
STRCPY(device_ins_[avai_idx].storage_info_, storage_info.ptr());
ObString cur_key(device_ins_[avai_idx].storage_info_);
if (OB_FAIL(device_map_.set_refactored(cur_key, &(device_ins_[avai_idx])))) {
OB_LOG(WARN, "fail to set device to device map!",
K(ret), KP(storage_info.ptr()), K(storage_type_prefix));
OB_LOG(WARN, "fail to set device to device map!", K(ret), K(cur_key), K(storage_type_prefix));
} else if (OB_FAIL(handle_map_.set_refactored((int64_t)(device_handle), &(device_ins_[avai_idx])))) {
OB_LOG(WARN, "fail to set device to handle map!",
K(ret), KP(storage_info.ptr()), K(storage_type_prefix));
OB_LOG(WARN, "fail to set device to handle map!", K(ret), K(storage_info), K(storage_type_prefix));
} else {
OB_LOG(INFO, "success insert into map!",
KP(storage_info.ptr()), K(storage_type_prefix));
OB_LOG(INFO, "success insert into map!", K(storage_info), K(storage_type_prefix));
}
}
}
@ -222,8 +209,7 @@ int ObDeviceManager::alloc_device(ObDeviceInsInfo*& device_info,
device_ins_[avai_idx].device_ = device_handle;
device_ins_[avai_idx].ref_cnt_ = 0;
device_count_++;
OB_LOG(INFO, "alloc a new device!", KP(storage_info.ptr()),
K(storage_type_prefix), K(avai_idx), K(device_count_), K(device_handle));
OB_LOG(INFO, "alloc a new device!", K(storage_info), K(storage_type_prefix), K(avai_idx), K(device_count_), K(device_handle));
device_info = &(device_ins_[avai_idx]);
}
@ -261,12 +247,10 @@ int ObDeviceManager::get_device(const common::ObString& storage_info,
if (OB_HASH_NOT_EXIST == ret) {
//alloc a device, and set into the map
if (OB_FAIL(alloc_device(dev_info, storage_info_tmp, storage_type_prefix))) {
OB_LOG(WARN, "fail to alloc device!",
K(ret), KP(storage_info_tmp.ptr()), K(storage_type_prefix));
OB_LOG(WARN, "fail to alloc device!", K(ret), K(storage_info_tmp), K(storage_type_prefix));
}
} else {
OB_LOG(WARN, "fail to get device from device manager ",
K(ret), KP(storage_info_tmp.ptr()), K(storage_type_prefix));
OB_LOG(WARN, "fail to get device from device manager ", K(ret), K(storage_info_tmp), K(storage_type_prefix));
}
}
@ -309,7 +293,7 @@ int ObDeviceManager::release_device(ObIODevice*& device_handle)
abort_unless(device_info->ref_cnt_ > 0);
device_info->ref_cnt_--;
if (0 == device_info->ref_cnt_) {
OB_LOG(DEBUG, "A Device has no others ref", K(device_info->device_), KP(device_info->storage_info_));
OB_LOG(DEBUG, "A Device has no others ref", K(device_info->device_), K(device_info->storage_info_));
} else {
OB_LOG(DEBUG, "released dev info", K(device_info->device_), K(device_info->ref_cnt_));
}