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

@ -161,115 +161,6 @@ int ObTransferStatusHelper::check_can_change_status(
return ret;
}
/////////////// ObTransferRefreshStatus///////////////
ObTransferRefreshStatus &ObTransferRefreshStatus::operator=(const ObTransferRefreshStatus &other)
{
status_ = other.status_;
return *this;
}
ObTransferRefreshStatus &ObTransferRefreshStatus::operator=(const ObTransferRefreshStatus::STATUS &status)
{
status_ = status;
return *this;
}
const char *ObTransferRefreshStatus::str() const
{
const char *str = "INVALID";
switch (status_) {
case UNKNOWN: {
str = "UNKNOWN";
break;
}
case DOING: {
str = "DOING";
break;
}
case DONE: {
str = "DONE";
break;
}
default: {
break;
}
}
return str;
}
// change ObTransferStatus to ObTransferRefreshStatus
void ObTransferRefreshStatus::convert_from(const ObTransferStatus &status)
{
if (status.is_init_status()
|| status.is_start_status()) {
status_ = UNKNOWN;
} else if (status.is_doing_status()
|| status.is_completed_status()) {
status_ = DOING;
} else if (status.is_aborted_status()
|| status.is_canceled_status()
|| status.is_failed_status()) {
status_ = DONE;
} else {
status_ = INVALID;
}
}
// update status according to state machine
void ObTransferRefreshStatus::update(
const ObTransferRefreshStatus &other,
bool &changed)
{
changed = false;
const ObTransferRefreshStatus::STATUS &new_status = other.status_;
switch (status_) {
case INVALID : {
if (INVALID != new_status) {
changed = true;
status_ = new_status;
}
break;
}
case UNKNOWN: {
if (DOING == new_status
|| DONE == new_status) {
changed = true;
status_ = other.status_;
}
break;
}
case DOING: {
if (DONE == new_status) {
changed = true;
status_ = new_status;
}
break;
}
case DONE: {
break;
}
default: {
break;
}
}
}
int ObTransferRefreshInfo::init(
const ObTransferTaskID &task_id,
const ObTransferRefreshStatus &status)
{
int ret = OB_SUCCESS;
task_id_ = task_id;
status_ = status;
return ret;
}
void ObTransferRefreshInfo::reset()
{
task_id_.reset();
status_.reset();
}
ObTransferTabletInfo::ObTransferTabletInfo()
: tablet_id_(),
transfer_seq_(OB_INVALID_TRANSFER_SEQ)
@ -752,28 +643,6 @@ int ObTransferTaskInfo::assign(const ObTransferTaskInfo &task_info)
return ret;
}
int ObTransferTaskInfo::fill_tablet_ids(ObIArray<ObTabletID> &tablet_ids) const
{
int ret = OB_SUCCESS;
if (OB_UNLIKELY(!tablet_ids.empty())) {
ret = OB_INVALID_ARGUMENT;
LOG_WARN("invalid argument, tablet_ids should be empty", K(ret));
} else if (OB_FAIL(tablet_ids.reserve(tablet_list_.count()))) {
LOG_WARN("failed to reserve tablet_ids", K(ret));
} else {
FOREACH_X(it, tablet_list_, OB_SUCC(ret)) {
const ObTabletID &tablet_id = it->tablet_id();
if (OB_UNLIKELY(!tablet_id.is_valid())) {
ret = OB_INVALID_ARGUMENT;
LOG_WARN("invalid tablet id", K(ret), K(tablet_id));
} else if (OB_FAIL(tablet_ids.push_back(tablet_id))) {
LOG_WARN("failed to push back tablet_id", K(ret), K(tablet_id));
}
}
}
return ret;
}
int ObTransferLockUtil::lock_tablet_on_dest_ls_for_table_lock(
ObMySQLTransaction &trans,
const uint64_t tenant_id,
@ -828,13 +697,14 @@ int ObTransferLockUtil::unlock_tablet_on_src_ls_for_table_lock(
return ret;
}
template<typename LockArg>
int ObTransferLockUtil::process_table_lock_on_tablets_(
ObMySQLTransaction &trans,
const uint64_t tenant_id,
const ObLSID &ls_id,
const transaction::tablelock::ObTableLockOwnerID &lock_owner_id,
const ObDisplayTabletList &table_lock_tablet_list,
ObLockAloneTabletRequest &lock_arg)
LockArg &lock_arg)
{
int ret = OB_SUCCESS;
lock_arg.tablet_ids_.reset();
@ -871,7 +741,7 @@ int ObTransferLockUtil::process_table_lock_on_tablets_(
LOG_WARN("lock tablet failed", KR(ret), K(tenant_id), K(lock_arg));
}
} else if (OUT_TRANS_UNLOCK == lock_arg.op_type_) {
if (OB_FAIL(ObInnerConnectionLockUtil::unlock_tablet(tenant_id, static_cast<ObUnLockAloneTabletRequest &>(lock_arg), conn))) {
if (OB_FAIL(ObInnerConnectionLockUtil::unlock_tablet(tenant_id, lock_arg, conn))) {
LOG_WARN("unock tablet failed", KR(ret), K(tenant_id), K(lock_arg));
}
} else {