[FEAT MERGE] Merge syslog user experience improvement to master

Co-authored-by: Charles0429 <xiezhenjiang@gmail.com>
Co-authored-by: tino247 <tino247@126.com>
Co-authored-by: chaser-ch <chaser.ch@antgroup.com>
This commit is contained in:
stdliu
2023-02-06 15:52:23 +08:00
committed by ob-robot
parent 1de9266dd0
commit f8c5c2647f
796 changed files with 4465 additions and 3036 deletions

View File

@ -183,7 +183,7 @@ int ObRpcLoadDataShuffleTaskCallBack::process() {
}
void ObRpcLoadDataShuffleTaskCallBack::on_timeout() {
LOG_WARN("LOAD DATA main thread shuffle task rpc timeout");
LOG_WARN_RET(OB_TIMEOUT, "LOAD DATA main thread shuffle task rpc timeout");
if (OB_NOT_NULL(handle_)) {
handle_->result.flags_.set_bit(ObTaskResFlag::RPC_TIMEOUT);
}
@ -230,12 +230,12 @@ void ObRpcLoadDataInsertTaskCallBack::set_args(const Request &arg)
void ObRpcLoadDataInsertTaskCallBack::on_timeout() {
int64_t task_id = -2; //undefined
if (OB_ISNULL(insert_task_)) {
LOG_ERROR("insert task is null on timeout");
LOG_ERROR_RET(OB_ERR_UNEXPECTED, "insert task is null on timeout");
} else {
task_id = insert_task_->task_id_;
insert_task_->result_.flags_.set_bit(ObTaskResFlag::RPC_TIMEOUT);
}
LOG_WARN("LOAD DATA main thread insert task rpc timeout", K(task_id));
LOG_WARN_RET(OB_TIMEOUT, "LOAD DATA main thread insert task rpc timeout", K(task_id));
release_resouce();
}
@ -526,18 +526,18 @@ void ObParallelTaskController::wait_all_task_finish(const char *task_name, int64
if (0 == wait_duration_ms % 1000) {
int64_t current_ts = ObTimeUtil::current_time();
if (current_ts > until_ts) {
LOG_ERROR("waiting load data task too long and exceed max waiting timestamp",
LOG_ERROR_RET(OB_ERR_UNEXPECTED, "waiting load data task too long and exceed max waiting timestamp",
K(begin_ts), K(until_ts), K(current_ts));
}
}
if (!is_too_long && wait_duration_ms > 10 * 1000) {
is_too_long = true;
LOG_WARN("LOAD DATA, waiting task finish too long",
LOG_WARN_RET(OB_ERR_UNEXPECTED, "LOAD DATA, waiting task finish too long",
K(task_name), K(processing_count), K(wait_duration_ms), K(until_ts));
}
}
if (is_too_long) {
LOG_WARN("LOAD DATA finish waitting long task", K(wait_duration_ms));
LOG_WARN_RET(OB_ERR_UNEXPECTED, "LOAD DATA finish waitting long task", K(wait_duration_ms));
}
}

View File

@ -213,7 +213,7 @@ ObString ObLoadDataUtils::escape_quotation(const ObString &value, ObDataBuffer &
ObString result;
if (OB_ISNULL(buf)) {
LOG_WARN("data buf is not inited");
LOG_WARN_RET(OB_NOT_INIT, "data buf is not inited");
} else {
//check if escape is needed
bool need_escape = false;
@ -242,7 +242,7 @@ ObString ObLoadDataUtils::escape_quotation(const ObString &value, ObDataBuffer &
escape_sm.shift_by_input(*(src + i));
}
if (OB_UNLIKELY(pos >= data_buf.get_capacity())) {
LOG_ERROR("data is too long"); //this should never happened, just for protection
LOG_ERROR_RET(OB_ERR_UNEXPECTED, "data is too long"); //this should never happened, just for protection
result.reset();
} else {
result.assign_ptr(buf, static_cast<int32_t>(pos));
@ -269,7 +269,7 @@ bool ObKMPStateMachine::scan_buf(char *&cur_pos, const char *buf_end)
{
bool matched = false;
if (OB_UNLIKELY(!is_inited_ || NULL == cur_pos)) {
LOG_ERROR("ObKmpStateMachine not inited.", K(cur_pos), K(buf_end));
LOG_ERROR_RET(OB_NOT_INIT, "ObKmpStateMachine not inited.", K(cur_pos), K(buf_end));
} else {
for (;!matched && cur_pos < buf_end; cur_pos++) {
while (matched_pos_ > 0 && *cur_pos != str_[matched_pos_]) {

View File

@ -249,7 +249,7 @@ public:
{
bool ret_bool = false;
if (OB_UNLIKELY(!is_inited_)) {
SQL_ENG_LOG(ERROR, "ObKmpSeparatorDetector not inited.");
SQL_ENG_LOG_RET(ERROR, common::OB_NOT_INIT, "ObKmpSeparatorDetector not inited.");
} else {
while (matched_pos_ > 0 && c != str_[matched_pos_]) {
matched_pos_ = next_[matched_pos_];