Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
caoersss
oceanbase
提交
a496e671
O
oceanbase
项目概览
caoersss
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a496e671
编写于
3月 28, 2022
作者:
Z
zh0
提交者:
LINGuanRen
3月 28, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change record and print trace log config parameter
上级
403f881b
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
25 addition
and
25 deletion
+25
-25
deps/oblib/src/lib/oblog/ob_trace_log.h
deps/oblib/src/lib/oblog/ob_trace_log.h
+19
-19
src/observer/ob_server_reload_config.cpp
src/observer/ob_server_reload_config.cpp
+1
-1
src/share/parameter/ob_parameter_seed.ipp
src/share/parameter/ob_parameter_seed.ipp
+2
-2
src/storage/transaction/ob_trans_ctx.cpp
src/storage/transaction/ob_trans_ctx.cpp
+3
-3
未找到文件。
deps/oblib/src/lib/oblog/ob_trace_log.h
浏览文件 @
a496e671
...
...
@@ -52,23 +52,23 @@
})
#define NG_TRACE_EXT_TIMES(times, ...) \
if (CHECK_TRACE_TIMES(times, 500, NULL)) { \
if (
oceanbase::lib::is_trace_log_enabled() &&
CHECK_TRACE_TIMES(times, 500, NULL)) { \
NG_TRACE_EXT(__VA_ARGS__); \
}
#define NG_TRACE_TIMES(times, ...) \
if (CHECK_TRACE_TIMES(times, 500, NULL)) { \
if (
oceanbase::lib::is_trace_log_enabled() &&
CHECK_TRACE_TIMES(times, 500, NULL)) { \
NG_TRACE(__VA_ARGS__); \
}
#define NG_TRACE_TIMES_WITH_TRACE_ID(times, tmp_cur_trace_id, ...) \
if (
CHECK_TRACE_TIMES(times, 500, tmp_cur_trace_id)) {
\
if (
oceanbase::lib::is_trace_log_enabled() && CHECK_TRACE_TIMES(times, 500, tmp_cur_trace_id)) {
\
NG_TRACE(__VA_ARGS__); \
}
// Ordinary print log level, judged according to the current system configuration level
#define PRINT_TRACE(log_buffer) \
if (
OB_TRACE_CONFIG::get_log_level() <= OB_LOGGER.get_log_level()) {
\
if (
oceanbase::lib::is_trace_log_enabled() && OB_TRACE_CONFIG::get_log_level() <= OB_LOGGER.get_log_level()) {
\
if (NULL != log_buffer) { \
::oceanbase::common::OB_PRINT("[TRACE]", OB_LOG_LEVEL_DIRECT(TRACE), "[normal]", "TRACE", log_buffer); \
} \
...
...
@@ -77,7 +77,7 @@
// For logs that are forced to be printed, you can also judge according to the log level: if it is ERROR level, it will
// not print, and other levels will be forced to print
#define FORCE_PRINT_TRACE(log_buffer, HEAD) \
if (
OB_LOGGER.get_log_level() != ObLogger::LogLevel::LOG_ERROR) {
\
if (
oceanbase::lib::is_trace_log_enabled() && OB_LOGGER.get_log_level() != ObLogger::LogLevel::LOG_ERROR) {
\
if (NULL != log_buffer) { \
::oceanbase::common::OB_PRINT("[TRACE]", OB_LOG_LEVEL_DIRECT(TRACE), HEAD, "TRACE", *log_buffer); \
} \
...
...
src/observer/ob_server_reload_config.cpp
浏览文件 @
a496e671
...
...
@@ -124,7 +124,7 @@ int ObServerReloadConfig::operator()()
}
(
void
)
reload_diagnose_info_config
(
GCONF
.
enable_perf_event
);
(
void
)
reload_trace_log_config
(
GCONF
.
enable_
sql_audit
);
(
void
)
reload_trace_log_config
(
GCONF
.
enable_
record_trace_log
);
ObTenantManager
::
get_instance
().
reload_config
();
}
...
...
src/share/parameter/ob_parameter_seed.ipp
浏览文件 @
a496e671
...
...
@@ -111,8 +111,8 @@ DEF_BOOL(enable_one_phase_commit, OB_CLUSTER_PARAMETER, "False", "enable one pha
ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
DEPRECATED_DEF_BOOL(enable_pg, OB_CLUSTER_PARAMETER, "False", "open partition group",
ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
DEF_BOOL(enable_record_trace_log, OB_CLUSTER_PARAMETER, "
Fals
e",
"specifies whether to always record the trace log. The default value is
Fals
e.",
DEF_BOOL(enable_record_trace_log, OB_CLUSTER_PARAMETER, "
Tru
e",
"specifies whether to always record the trace log. The default value is
Tru
e.",
ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
DEF_INT(system_trace_level, OB_CLUSTER_PARAMETER, "1", "[0,2]",
"system trace log level, 0:none, 1:standard, 2:debug. "
...
...
src/storage/transaction/ob_trans_ctx.cpp
浏览文件 @
a496e671
...
...
@@ -357,16 +357,16 @@ int ObTransCtx::set_partition_trans_ctx_mgr(ObPartitionTransCtxMgr* partition_mg
int
ObTransCtx
::
alloc_audit_rec_and_trace_log_
(
ObTransService
*
trans_service
,
ObTransTraceLog
*&
trace_log
)
{
int
ret
=
OB_SUCCESS
;
// 1.
sql_audit
is on. If fail to get recod but revert successfully,
// 1.
enable_record_trace_log
is on. If fail to get recod but revert successfully,
// it needs to be allocated dynamically. Return error if fail to revert.
// 2.
sql_audit
is off. Trace log is not required to be recorded
// 2.
enable_record_trace_log
is off. Trace log is not required to be recorded
bool
need_alloc
=
true
;
ObTransTraceLog
*
tmp_tlog
=
NULL
;
if
(
OB_ISNULL
(
trans_service
))
{
TRANS_LOG
(
WARN
,
"invalid argument"
,
K
(
trans_service
));
ret
=
OB_INVALID_ARGUMENT
;
}
else
if
(
!
GCONF
.
enable_sql_audit
)
{
}
else
if
(
!
oceanbase
::
lib
::
is_trace_log_enabled
()
)
{
need_alloc
=
false
;
ret
=
OB_SUCCESS
;
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录