fix sys_io accumulate

This commit is contained in:
renju96 2023-11-13 08:42:42 +00:00 committed by ob-robot
parent d2700bedea
commit 26575e6818
2 changed files with 8 additions and 4 deletions

View File

@ -630,7 +630,11 @@ void ObIOResult::finish(const ObIORetCode &ret_code, ObIORequest *req)
ret_code_ = ret_code;
is_finished_ = true;
if (OB_NOT_NULL(tenant_io_mgr_.get_ptr()) && OB_NOT_NULL(req)) {
tenant_io_mgr_.get_ptr()->io_usage_.accumulate(*this, *req);
if (is_sys_group(get_group_id())) {
tenant_io_mgr_.get_ptr()->io_backup_usage_.accumulate(*this, *req);
} else {
tenant_io_mgr_.get_ptr()->io_usage_.accumulate(*this, *req);
}
tenant_io_mgr_.get_ptr()->io_usage_.record_request_finish(*this);
end_ts_ = ObTimeUtility::fast_current_time();
// record io error

View File

@ -2202,7 +2202,7 @@ int ObAsyncIOChannel::on_full_return(ObIORequest &req, const int64_t complete_si
if (OB_FAIL(req.recycle_buffer())) {
LOG_WARN("recycle io raw buffer failed", K(ret), K(req));
}
req.io_result_->finish(OB_SUCCESS);
req.io_result_->finish(ret, &req);
}
}
return ret;
@ -2226,7 +2226,7 @@ int ObAsyncIOChannel::on_partial_return(ObIORequest &req, const int64_t complete
if (OB_FAIL(req.recycle_buffer())) {
LOG_WARN("recycle io raw buffer failed", K(ret), K(req));
}
req.io_result_->finish(OB_SUCCESS);
req.io_result_->finish(ret, &req);
}
} else {
if (OB_FAIL(req.recycle_buffer())) {
@ -2470,7 +2470,7 @@ int ObSyncIOChannel::do_sync_io(ObIORequest &req)
req.io_result_->finish(ret, &req);
}
} else {
req.io_result_->finish(OB_SUCCESS);
req.io_result_->finish(ret, &req);
}
}
return ret;