未验证 提交 6aa3e351 编写于 作者: E Ethanzjp 提交者: GitHub

Fix the log message, make it consistent (#44)

* Making the root service log consistent

* update log message

* fix typo

* making the log message consistent
Co-authored-by: NEthanDBer <13810907+EthanDBer@users.noreply.github.com>
上级 90bf58aa
...@@ -35,7 +35,7 @@ int ObBatchPacketCodec::encode_batch_header(char* buf, const int64_t len, int64_ ...@@ -35,7 +35,7 @@ int ObBatchPacketCodec::encode_batch_header(char* buf, const int64_t len, int64_
int64_t new_pos = pos; int64_t new_pos = pos;
if (OB_ISNULL(buf) || len <= 0 || pos < 0 || OB_INVALID_TIMESTAMP == timestamp || !server.is_valid() || count < 0) { if (OB_ISNULL(buf) || len <= 0 || pos < 0 || OB_INVALID_TIMESTAMP == timestamp || !server.is_valid() || count < 0) {
ret = OB_INVALID_ARGUMENT; ret = OB_INVALID_ARGUMENT;
CLOG_LOG(WARN, "incalid argument", KP(buf), K(len), K(pos), K(timestamp), K(server), K(count)); CLOG_LOG(WARN, "invalid argument", KP(buf), K(len), K(pos), K(timestamp), K(server), K(count));
} else if (OB_FAIL(serialization::encode_i64(buf, len, new_pos, timestamp))) { } else if (OB_FAIL(serialization::encode_i64(buf, len, new_pos, timestamp))) {
} else if (OB_FAIL(serialization::encode_i32(buf, len, new_pos, count))) { } else if (OB_FAIL(serialization::encode_i32(buf, len, new_pos, count))) {
} else if (OB_FAIL(server.serialize(buf, len, new_pos))) { } else if (OB_FAIL(server.serialize(buf, len, new_pos))) {
......
...@@ -56,7 +56,7 @@ int ObCLogBaseFileWriter::init( ...@@ -56,7 +56,7 @@ int ObCLogBaseFileWriter::init(
CLOG_LOG(WARN, "already inited", K(ret)); CLOG_LOG(WARN, "already inited", K(ret));
} else if (OB_ISNULL(log_dir) || OB_ISNULL(shm_path) || OB_ISNULL(file_store)) { } else if (OB_ISNULL(log_dir) || OB_ISNULL(shm_path) || OB_ISNULL(file_store)) {
ret = OB_INVALID_ARGUMENT; ret = OB_INVALID_ARGUMENT;
CLOG_LOG(WARN, "invalid param", K(ret), K(log_dir), K(align_size), KP(file_store)); CLOG_LOG(WARN, "invalid argument", K(ret), K(log_dir), K(align_size), KP(file_store));
} else if (OB_FAIL(ObBaseLogBufferMgr::get_instance().get_buffer(shm_path, log_ctrl_))) { } else if (OB_FAIL(ObBaseLogBufferMgr::get_instance().get_buffer(shm_path, log_ctrl_))) {
CLOG_LOG(WARN, "get log buf failed", K(ret), K(log_dir)); CLOG_LOG(WARN, "get log buf failed", K(ret), K(log_dir));
} else { } else {
......
...@@ -126,7 +126,7 @@ int ObRootServiceMonitor::monitor_root_service() ...@@ -126,7 +126,7 @@ int ObRootServiceMonitor::monitor_root_service()
} else if (root_service_.is_stopping()) { } else if (root_service_.is_stopping()) {
// need exit // need exit
if (OB_FAIL(root_service_.stop_service())) { if (OB_FAIL(root_service_.stop_service())) {
LOG_WARN("root_service stop_service failed", K(ret)); LOG_WARN("root service stop service failed", K(ret));
} else { } else {
LOG_INFO("root service stop service finish success"); LOG_INFO("root service stop service finish success");
} }
...@@ -140,10 +140,10 @@ int ObRootServiceMonitor::monitor_root_service() ...@@ -140,10 +140,10 @@ int ObRootServiceMonitor::monitor_root_service()
} else if (!root_service_.can_start_service()) { } else if (!root_service_.can_start_service()) {
LOG_ERROR("bug here. root service can not start service"); LOG_ERROR("bug here. root service can not start service");
} else { } else {
LOG_INFO("try to start rootservice"); LOG_INFO("try to start root service");
DEBUG_SYNC(BEFORE_START_RS); DEBUG_SYNC(BEFORE_START_RS);
if (OB_FAIL(try_start_root_service())) { if (OB_FAIL(try_start_root_service())) {
LOG_WARN("fail to start root_service", K(ret)); LOG_WARN("fail to start root service", K(ret));
} else { } else {
LOG_INFO("start root service success"); LOG_INFO("start root service success");
} }
...@@ -161,7 +161,7 @@ int ObRootServiceMonitor::monitor_root_service() ...@@ -161,7 +161,7 @@ int ObRootServiceMonitor::monitor_root_service()
// nothing todo // nothing todo
} else if (root_service_.is_stopping()) { } else if (root_service_.is_stopping()) {
if (OB_FAIL(root_service_.stop_service())) { if (OB_FAIL(root_service_.stop_service())) {
LOG_WARN("root_service stop_service failed", K(ret)); LOG_WARN("root service stop service failed", K(ret));
} else { } else {
LOG_INFO("root service stop service finish success"); LOG_INFO("root service stop service finish success");
} }
...@@ -213,7 +213,7 @@ int ObRootServiceMonitor::try_start_root_service() ...@@ -213,7 +213,7 @@ int ObRootServiceMonitor::try_start_root_service()
usleep(2 * MONITOR_ROOT_SERVICE_INTERVAL_US); usleep(2 * MONITOR_ROOT_SERVICE_INTERVAL_US);
} }
} else if (!stopped) { } else if (!stopped) {
LOG_WARN("already have rootservice in service, start service later"); LOG_WARN("already have root service in service, start service later");
ret = OB_SUCCESS; ret = OB_SUCCESS;
if (!has_set_stop()) { if (!has_set_stop()) {
usleep(2 * MONITOR_ROOT_SERVICE_INTERVAL_US); usleep(2 * MONITOR_ROOT_SERVICE_INTERVAL_US);
...@@ -223,7 +223,7 @@ int ObRootServiceMonitor::try_start_root_service() ...@@ -223,7 +223,7 @@ int ObRootServiceMonitor::try_start_root_service()
if (OB_SUCC(ret)) { if (OB_SUCC(ret)) {
LOG_INFO("try to start root service"); LOG_INFO("try to start root service");
if (OB_FAIL(root_service_.start_service())) { if (OB_FAIL(root_service_.start_service())) {
LOG_WARN("root_service start_service failed", K(ret)); LOG_WARN("root service start service failed", K(ret));
} else { } else {
LOG_INFO("root service start service success", K(ret)); LOG_INFO("root service start service success", K(ret));
} }
......
...@@ -46,7 +46,7 @@ void ObServerMemoryCutter::free_cache(int64_t& total_size) ...@@ -46,7 +46,7 @@ void ObServerMemoryCutter::free_cache(int64_t& total_size)
}, },
has_crash); has_crash);
if (has_crash) { if (has_crash) {
DLOG(WARN, "restore from crash, let's goon~"); DLOG(WARN, "restore from crash, let's go on~");
} }
} }
} }
...@@ -59,7 +59,7 @@ void ObServerMemoryCutter::cut(int64_t& total_size) ...@@ -59,7 +59,7 @@ void ObServerMemoryCutter::cut(int64_t& total_size)
int64_t total_size_bak = total_size; int64_t total_size_bak = total_size;
do_with_crash_restore([&]() { return free_cache(total_size); }, has_crash); do_with_crash_restore([&]() { return free_cache(total_size); }, has_crash);
if (has_crash) { if (has_crash) {
DLOG(WARN, "restore from crash, let's goon~"); DLOG(WARN, "restore from crash, let's go on~");
} else { } else {
DLOG(INFO, "free_cache, freed: %ld", total_size - total_size_bak); DLOG(INFO, "free_cache, freed: %ld", total_size - total_size_bak);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册