fix too much log in errsim
This commit is contained in:
6
deps/oblib/src/lib/oblog/ob_log.cpp
vendored
6
deps/oblib/src/lib/oblog/ob_log.cpp
vendored
@ -337,6 +337,8 @@ ProbeAction probe_str2action(const char *str)
|
|||||||
action = ProbeAction::PROBE_BT;
|
action = ProbeAction::PROBE_BT;
|
||||||
} else if (0 == strcmp(str, "abort")) {
|
} else if (0 == strcmp(str, "abort")) {
|
||||||
action = ProbeAction::PROBE_ABORT;
|
action = ProbeAction::PROBE_ABORT;
|
||||||
|
} else if (0 == strcmp(str, "disable")) {
|
||||||
|
action = ProbeAction::PROBE_DISABLE;
|
||||||
}
|
}
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
@ -353,6 +355,10 @@ const char *probe_action2str(ProbeAction action)
|
|||||||
str = "abort";
|
str = "abort";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case ProbeAction::PROBE_DISABLE: {
|
||||||
|
str = "disable";
|
||||||
|
break;
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
str = "none";
|
str = "none";
|
||||||
break;
|
break;
|
||||||
|
|||||||
36
deps/oblib/src/lib/oblog/ob_log.h
vendored
36
deps/oblib/src/lib/oblog/ob_log.h
vendored
@ -235,6 +235,7 @@ enum class ProbeAction
|
|||||||
PROBE_NONE,
|
PROBE_NONE,
|
||||||
PROBE_BT,
|
PROBE_BT,
|
||||||
PROBE_ABORT,
|
PROBE_ABORT,
|
||||||
|
PROBE_DISABLE,
|
||||||
};
|
};
|
||||||
|
|
||||||
//@class ObLogger
|
//@class ObLogger
|
||||||
@ -724,10 +725,11 @@ private:
|
|||||||
const uint64_t location_hash_val,
|
const uint64_t location_hash_val,
|
||||||
Function &&log_data_func);
|
Function &&log_data_func);
|
||||||
void check_probe(
|
void check_probe(
|
||||||
const char *file,
|
const char* file,
|
||||||
int32_t line,
|
int32_t line,
|
||||||
const uint64_t location_hash_val,
|
const uint64_t location_hash_val,
|
||||||
bool &force_bt);
|
bool& force_bt,
|
||||||
|
bool& disable);
|
||||||
private:
|
private:
|
||||||
static const char *const errstr_[];
|
static const char *const errstr_[];
|
||||||
// default log rate limiter if there's no tl_log_limiger
|
// default log rate limiter if there's no tl_log_limiger
|
||||||
@ -1071,12 +1073,14 @@ inline int ObLogger::set_mod_log_levels(const char *level_str, int64_t version)
|
|||||||
extern void __attribute__ ((noinline)) on_probe_abort();
|
extern void __attribute__ ((noinline)) on_probe_abort();
|
||||||
|
|
||||||
inline void ObLogger::check_probe(
|
inline void ObLogger::check_probe(
|
||||||
const char *file,
|
const char* file,
|
||||||
int32_t line,
|
int32_t line,
|
||||||
const uint64_t location_hash_val,
|
const uint64_t location_hash_val,
|
||||||
bool &force_bt)
|
bool& force_bt,
|
||||||
|
bool& disable)
|
||||||
{
|
{
|
||||||
force_bt = false;
|
force_bt = false;
|
||||||
|
disable = false;
|
||||||
for (int i = 0; i < probe_cnt_; i++) {
|
for (int i = 0; i < probe_cnt_; i++) {
|
||||||
auto &probe = probes_[i];
|
auto &probe = probes_[i];
|
||||||
if (location_hash_val == probe.location_hash_val_ &&
|
if (location_hash_val == probe.location_hash_val_ &&
|
||||||
@ -1089,9 +1093,23 @@ inline void ObLogger::check_probe(
|
|||||||
filename++;
|
filename++;
|
||||||
}
|
}
|
||||||
if (0 == strncmp(filename, probe.file_, sizeof probe.file_)) {
|
if (0 == strncmp(filename, probe.file_, sizeof probe.file_)) {
|
||||||
force_bt = ProbeAction::PROBE_BT == probe.action_;
|
switch (probe.action_) {
|
||||||
if (ProbeAction::PROBE_ABORT == probe.action_) {
|
case ProbeAction::PROBE_BT: {
|
||||||
on_probe_abort();
|
force_bt = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case ProbeAction::PROBE_ABORT: {
|
||||||
|
on_probe_abort();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case ProbeAction::PROBE_DISABLE: {
|
||||||
|
disable = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
// do nothing
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1117,7 +1135,9 @@ inline void ObLogger::do_log_message(const bool is_async,
|
|||||||
bool allow = true;
|
bool allow = true;
|
||||||
|
|
||||||
bool force_bt = false;
|
bool force_bt = false;
|
||||||
check_probe(file, line, location_hash_val, force_bt);
|
bool disable = false;
|
||||||
|
check_probe(file, line, location_hash_val, force_bt, disable);
|
||||||
|
if(OB_UNLIKELY(disable)) return;
|
||||||
const int64_t logging_time_us_begin = get_cur_us();
|
const int64_t logging_time_us_begin = get_cur_us();
|
||||||
auto fd_type = get_fd_type(mod_name);
|
auto fd_type = get_fd_type(mod_name);
|
||||||
if (OB_FAIL(precheck_tl_log_limiter(level, allow))) {
|
if (OB_FAIL(precheck_tl_log_limiter(level, allow))) {
|
||||||
|
|||||||
5
deps/oblib/src/lib/utility/ob_tracepoint.h
vendored
5
deps/oblib/src/lib/utility/ob_tracepoint.h
vendored
@ -25,6 +25,7 @@
|
|||||||
#include "lib/alloc/alloc_assist.h"
|
#include "lib/alloc/alloc_assist.h"
|
||||||
#include "lib/list/ob_dlist.h"
|
#include "lib/list/ob_dlist.h"
|
||||||
#include "lib/coro/co_var.h"
|
#include "lib/coro/co_var.h"
|
||||||
|
#include "lib/time/ob_tsc_timestamp.h"
|
||||||
|
|
||||||
#define TP_COMMA(x) ,
|
#define TP_COMMA(x) ,
|
||||||
#define TP_EMPTY(x)
|
#define TP_EMPTY(x)
|
||||||
@ -218,7 +219,9 @@ struct EventItem
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
} else if (trigger_freq_ == 1) {
|
} else if (trigger_freq_ == 1) {
|
||||||
ret = static_cast<int>(error_code_);
|
ret = static_cast<int>(error_code_);
|
||||||
COMMON_LOG(WARN, "[ERRSIM] sim error", K(ret));
|
if (REACH_TIME_INTERVAL(1 * 1000 * 1000)) {
|
||||||
|
COMMON_LOG(WARN, "[ERRSIM] sim error", K(ret));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (rand() % trigger_freq_ == 0) {
|
if (rand() % trigger_freq_ == 0) {
|
||||||
ret = static_cast<int>(error_code_);
|
ret = static_cast<int>(error_code_);
|
||||||
|
|||||||
@ -23,13 +23,11 @@
|
|||||||
datafile_size: '60G'
|
datafile_size: '60G'
|
||||||
system_memory: '15G'
|
system_memory: '15G'
|
||||||
cpu_count: '16'
|
cpu_count: '16'
|
||||||
stack_size: '512K'
|
|
||||||
cache_wash_threshold: '1G'
|
cache_wash_threshold: '1G'
|
||||||
__min_full_resource_pool_memory: "1073741824"
|
__min_full_resource_pool_memory: "1073741824"
|
||||||
workers_per_cpu_quota: '10'
|
workers_per_cpu_quota: '10'
|
||||||
schema_history_expire_time: '1d'
|
schema_history_expire_time: '1d'
|
||||||
net_thread_count: '4'
|
net_thread_count: '4'
|
||||||
enable_async_syslog: False
|
|
||||||
{{%% EXTRA_PARAM %%}}
|
{{%% EXTRA_PARAM %%}}
|
||||||
|
|
||||||
{{%% PROXY_CONF %%}}
|
{{%% PROXY_CONF %%}}
|
||||||
|
|||||||
@ -23,11 +23,9 @@ config:
|
|||||||
memory_limit: '8G'
|
memory_limit: '8G'
|
||||||
system_memory: '1G'
|
system_memory: '1G'
|
||||||
cpu_count: '24'
|
cpu_count: '24'
|
||||||
stack_size: '512K'
|
|
||||||
cache_wash_threshold: '1G'
|
cache_wash_threshold: '1G'
|
||||||
__min_full_resource_pool_memory: "1073741824"
|
__min_full_resource_pool_memory: "1073741824"
|
||||||
workers_per_cpu_quota: '10'
|
workers_per_cpu_quota: '10'
|
||||||
schema_history_expire_time: '1d'
|
schema_history_expire_time: '1d'
|
||||||
net_thread_count: '4'
|
net_thread_count: '4'
|
||||||
syslog_io_bandwidth_limit: '10G'
|
syslog_io_bandwidth_limit: '10G'
|
||||||
enable_async_syslog: 'FALSE'
|
|
||||||
|
|||||||
Reference in New Issue
Block a user