[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

@ -72,11 +72,11 @@ public:
{
bool bret = false;
if (NULL == items_) {
LIB_LOG(ERROR, "invalid item", K(items_));
LIB_LOG_RET(ERROR, common::OB_INVALID_ARGUMENT, "invalid item", K(items_));
} else if (id < 0) {
LIB_LOG(ERROR, "invalid id", K(id));
LIB_LOG_RET(ERROR, common::OB_INVALID_ARGUMENT, "invalid id", K(id));
} else if (0 == len_) {
LIB_LOG(ERROR, "invalid len", K(len_));
LIB_LOG_RET(ERROR, common::OB_INVALID_ARGUMENT, "invalid len", K(len_));
} else {
bret = items_[id % len_] >= id + READY;
}

View File

@ -192,14 +192,14 @@ IObDedupTask *ObDedupQueue::copy_task_(const IObDedupTask &task)
{
IObDedupTask *ret = NULL;
if (IS_NOT_INIT) {
COMMON_LOG(WARN, "ObDedupQueue is not inited");
COMMON_LOG_RET(WARN, OB_NOT_INIT, "ObDedupQueue is not inited");
} else {
int64_t deep_copy_size = task.get_deep_copy_size();
char *memory = NULL;
if (NULL == (memory = (char *)allocator_.alloc(deep_copy_size))) {
COMMON_LOG(WARN, "alloc memory fail", K(deep_copy_size), K(task.get_type()));
COMMON_LOG_RET(WARN, OB_ALLOCATE_MEMORY_FAILED, "alloc memory fail", K(deep_copy_size), K(task.get_type()));
} else if (NULL == (ret = task.deep_copy(memory, deep_copy_size))) {
COMMON_LOG(WARN, "deep copy task object fail", K(deep_copy_size), KP(memory));
COMMON_LOG_RET(WARN, OB_ERROR, "deep copy task object fail", K(deep_copy_size), KP(memory));
} else {
COMMON_LOG(DEBUG, "deep copy task succ", K(ret), KP(memory), K(deep_copy_size));
ret->set_memory_ptr(memory);
@ -217,9 +217,9 @@ IObDedupTask *ObDedupQueue::copy_task_(const IObDedupTask &task)
void ObDedupQueue::destroy_task_(IObDedupTask *task)
{
if (IS_NOT_INIT) {
COMMON_LOG(WARN, "ObDedupQueue is not inited");
COMMON_LOG_RET(WARN, OB_NOT_INIT, "ObDedupQueue is not inited");
} else if (OB_ISNULL(task)) {
COMMON_LOG(WARN, "invalid argument");
COMMON_LOG_RET(WARN, OB_INVALID_ARGUMENT, "invalid argument");
} else {
char *memory = task->get_memory_ptr();
task->~IObDedupTask();
@ -341,7 +341,7 @@ bool ObDedupQueue::gc_()
if (OB_SUCCESS != hash_ret) {
const int64_t type = task_list[i]->get_type();
task_list[i]->unlock();
COMMON_LOG(WARN, "unexpected erase from task_map fail", K(hash_ret), K(type), K(task_list_size));
COMMON_LOG_RET(WARN, OB_ERR_UNEXPECTED, "unexpected erase from task_map fail", K(hash_ret), K(type), K(task_list_size));
} else {
task_list[i]->unlock();
destroy_task_(task_list[i]);
@ -365,7 +365,7 @@ void ObDedupQueue::run1()
IObDedupTask *task2process = NULL;
if (thread_pos < work_thread_num_) {
if (OB_SUCCESS != (tmp_ret = task_queue_.pop(task2process)) && OB_UNLIKELY(tmp_ret != OB_ENTRY_NOT_EXIST)) {
COMMON_LOG(WARN, "task_queue_.pop error", K(tmp_ret), K(task2process));
COMMON_LOG_RET(WARN, tmp_ret, "task_queue_.pop error", K(tmp_ret), K(task2process));
} else if (NULL != task2process) {
thread_meta.on_process_start(task2process);
task2process->process();
@ -398,7 +398,7 @@ void ObDedupQueue::run1()
if (0 == task_queue_.get_total()) {
if (OB_SUCCESS != (tmp_ret = task_queue_sync_.wait(QUEUE_WAIT_TIME_MS))) {
if (OB_TIMEOUT != tmp_ret) {
COMMON_LOG(WARN, "Fail to wait task queue sync, ", K(tmp_ret));
COMMON_LOG_RET(WARN, tmp_ret, "Fail to wait task queue sync, ", K(tmp_ret));
}
}
}
@ -408,7 +408,7 @@ void ObDedupQueue::run1()
if (thread_pos >= work_thread_num_) {
if (OB_SUCCESS != (tmp_ret = work_thread_sync_.wait(MAX_QUEUE_WAIT_TIME_MS))) {
if (OB_TIMEOUT != tmp_ret) {
COMMON_LOG(WARN, "Fail to wait work thread sync, ", K(tmp_ret));
COMMON_LOG_RET(WARN, tmp_ret, "Fail to wait work thread sync, ", K(tmp_ret));
}
}
}