[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:
@ -82,21 +82,21 @@ do {\
|
||||
#define CHECK_INIT()\
|
||||
do {\
|
||||
if (is_inited_ != true) {\
|
||||
DETECT_LOG(WARN, "not init yet", K_(is_inited));\
|
||||
DETECT_LOG_RET(WARN, OB_NOT_INIT, "not init yet", K_(is_inited));\
|
||||
return OB_NOT_INIT;\
|
||||
}} while(0)
|
||||
|
||||
#define CHECK_START()\
|
||||
do {\
|
||||
if (is_running_ != true) {\
|
||||
DETECT_LOG(WARN, "not running", K_(is_running));\
|
||||
DETECT_LOG_RET(WARN, OB_NOT_RUNNING, "not running", K_(is_running));\
|
||||
return OB_NOT_RUNNING;\
|
||||
}} while(0)
|
||||
|
||||
#define CHECK_ENABLED()\
|
||||
do {\
|
||||
if (!is_deadlock_enabled()) {\
|
||||
DETECT_LOG(WARN, "deadlock not enabled", K(is_deadlock_enabled()));\
|
||||
DETECT_LOG_RET(WARN, OB_NOT_RUNNING, "deadlock not enabled", K(is_deadlock_enabled()));\
|
||||
return OB_NOT_RUNNING;\
|
||||
}} while(0)
|
||||
|
||||
@ -105,4 +105,4 @@ if (!is_deadlock_enabled()) {\
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -503,4 +503,4 @@ const ObDetectorUserReportInfo &ObDetectorInnerReportInfo::get_user_report_info(
|
||||
|
||||
}// namespace detector
|
||||
}// namespace share
|
||||
}// namespace oceanbase
|
||||
}// namespace oceanbase
|
||||
|
||||
@ -118,7 +118,7 @@ int ObDeadLockDetectorMgr::InnerAllocHandle::InnerFactory::create(const UserBina
|
||||
void ObDeadLockDetectorMgr::InnerAllocHandle::InnerFactory::release(ObIDeadLockDetector *p_detector)
|
||||
{
|
||||
if (nullptr == p_detector) {
|
||||
DETECT_LOG(WARN, "p_detector is nullptr", KP(p_detector));
|
||||
DETECT_LOG_RET(WARN, common::OB_INVALID_ARGUMENT, "p_detector is nullptr", KP(p_detector));
|
||||
} else {
|
||||
p_detector->~ObIDeadLockDetector();
|
||||
ob_free(p_detector);
|
||||
@ -133,7 +133,7 @@ ObDeadLockDetectorMgr::DetectorRefGuard::~DetectorRefGuard()
|
||||
{
|
||||
ObDeadLockDetectorMgr *p_deadlock_detector_mgr = MTL(ObDeadLockDetectorMgr *);
|
||||
if (OB_ISNULL(p_deadlock_detector_mgr)) {
|
||||
DETECT_LOG(ERROR, "can not get ObDeadLockDetectorMgr", KP(p_deadlock_detector_mgr), K(MTL_ID()));
|
||||
DETECT_LOG_RET(ERROR, OB_ERR_UNEXPECTED, "can not get ObDeadLockDetectorMgr", KP(p_deadlock_detector_mgr), K(MTL_ID()));
|
||||
} else {
|
||||
p_deadlock_detector_mgr->detector_map_.revert(p_detector_);
|
||||
}
|
||||
@ -389,7 +389,7 @@ int ObDeadLockDetectorMgr::process_notify_parent_message(
|
||||
DETECT_LOG(ERROR, "can not get ObDeadLockDetectorMgr", KP(p_deadlock_detector_mgr), K(MTL_ID()));
|
||||
} else if (OB_FAIL(p_deadlock_detector_mgr->inner_alloc_handle_.inner_factory_.create(binary_key,
|
||||
[](const common::ObIArray<ObDetectorInnerReportInfo> &,
|
||||
const int64_t) -> int { DETECT_LOG(ERROR, "should not kill inner node");
|
||||
const int64_t) -> int { DETECT_LOG_RET(ERROR, common::OB_ERR_UNEXPECTED, "should not kill inner node");
|
||||
return common::OB_ERR_UNEXPECTED; },
|
||||
[binary_key](ObDetectorUserReportInfo& report_info) -> int {
|
||||
ObSharedGuard<char> ptr;
|
||||
|
||||
@ -117,7 +117,7 @@ void ObDeadLockDetectorRpc::destroy()
|
||||
if (is_inited_) {
|
||||
is_inited_ = false;
|
||||
} else {
|
||||
DETECT_LOG(WARN, "ObDeadLockDetectorRpc has been destroyed", K(lbt()));
|
||||
DETECT_LOG_RET(WARN, common::OB_ERR_UNEXPECTED, "ObDeadLockDetectorRpc has been destroyed", K(lbt()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -103,9 +103,9 @@ public:
|
||||
ObRpcResultCode &rcode = ObDetectorRpcProxy::AsyncCB<PC>::rcode_;
|
||||
|
||||
if (OB_SUCCESS != rcode.rcode_) {
|
||||
DETECT_LOG(WARN, "detector rpc returns error code(rpc level)", K(rcode), K(dst));
|
||||
DETECT_LOG_RET(WARN, rcode.rcode_, "detector rpc returns error code(rpc level)", K(rcode), K(dst));
|
||||
} else if (OB_SUCCESS != remote_ret) {
|
||||
DETECT_LOG(WARN, "detector rpc returns error code(detector level)",
|
||||
DETECT_LOG_RET(WARN, remote_ret, "detector rpc returns error code(detector level)",
|
||||
KR(remote_ret), K(rcode.rcode_), K(dst));
|
||||
} else {
|
||||
// do nothing
|
||||
@ -155,4 +155,4 @@ private:
|
||||
}// detector
|
||||
}// share
|
||||
}// oceanbase
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -107,7 +107,7 @@ int64_t UserBinaryKey::to_string(char *buffer, const int64_t length) const
|
||||
GET_TYPE(ID) key;\
|
||||
if (OB_SUCCESS != key.deserialize(key_binary_code_buffer_,\
|
||||
key_binary_code_buffer_length_, pos)) {\
|
||||
DETECT_LOG(WARN, "key deserilalize failed", KP_(key_type_id));\
|
||||
DETECT_LOG_RET(WARN, common::OB_ERR_UNEXPECTED, "key deserilalize failed", KP_(key_type_id));\
|
||||
} else {\
|
||||
used_length = key.to_string(buffer, length);\
|
||||
}\
|
||||
@ -286,4 +286,4 @@ uint64_t UserBinaryKey::hash() const
|
||||
|
||||
}// namespace detector
|
||||
}// namespace share
|
||||
}// namespace oceanbase
|
||||
}// namespace oceanbase
|
||||
|
||||
@ -40,7 +40,7 @@ bool ObLCLBatchSenderThread::RemoveIfOp::operator()(const ObDependencyResource &
|
||||
DETECT_TIME_GUARD(100_ms);
|
||||
if (OB_SUCCESS != (temp_ret = lcl_message_list_.push_back(lcl_msg))) {
|
||||
ret = false;
|
||||
DETECT_LOG(WARN, "push lcl message to lcl_message_list failed",
|
||||
DETECT_LOG_RET(WARN, temp_ret, "push lcl message to lcl_message_list failed",
|
||||
KR(temp_ret), K(lcl_msg));
|
||||
}
|
||||
return ret;
|
||||
@ -54,7 +54,7 @@ bool ObLCLBatchSenderThread::MergeOp::operator()(const ObDependencyResource &key
|
||||
|
||||
DETECT_TIME_GUARD(100_ms);
|
||||
if (OB_SUCCESS != (temp_ret = value.merge(lcl_message_))) {
|
||||
DETECT_LOG(WARN, "merge msg failed", K(temp_ret), K(value), K(lcl_message_));
|
||||
DETECT_LOG_RET(WARN, temp_ret, "merge msg failed", K(temp_ret), K(value), K(lcl_message_));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -141,7 +141,7 @@ void ObLCLBatchSenderThread::record_summary_info_and_logout_when_necessary_(int6
|
||||
int64_t _lcl_op_interval = ObServerConfig::get_instance()._lcl_op_interval;
|
||||
if (diff > _lcl_op_interval) {
|
||||
++over_night_times_;
|
||||
DETECT_LOG(WARN, "ObLCLBatchSenderThread is too busy",
|
||||
DETECT_LOG_RET(WARN, common::OB_ERR_UNEXPECTED, "ObLCLBatchSenderThread is too busy",
|
||||
K(end_ts), K(begin_ts), K(diff), K(*this));
|
||||
}
|
||||
|
||||
@ -219,4 +219,4 @@ void ObLCLBatchSenderThread::run1()
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user