Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6e12d8e7
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6e12d8e7
编写于
7月 08, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: adjust log
上级
09c095a9
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
28 addition
and
22 deletion
+28
-22
include/util/tlog.h
include/util/tlog.h
+1
-1
source/common/src/tglobal.c
source/common/src/tglobal.c
+4
-4
source/dnode/mgmt/exe/dmMain.c
source/dnode/mgmt/exe/dmMain.c
+1
-1
source/dnode/mgmt/mgmt_vnode/src/vmInt.c
source/dnode/mgmt/mgmt_vnode/src/vmInt.c
+2
-2
source/dnode/mgmt/node_mgmt/src/dmMgmt.c
source/dnode/mgmt/node_mgmt/src/dmMgmt.c
+1
-1
source/dnode/mnode/impl/src/mndSync.c
source/dnode/mnode/impl/src/mndSync.c
+1
-1
source/libs/function/inc/fnLog.h
source/libs/function/inc/fnLog.h
+8
-6
source/libs/sync/src/syncMain.c
source/libs/sync/src/syncMain.c
+2
-2
source/util/src/tlog.c
source/util/src/tlog.c
+2
-2
tests/script/sh/deploy.sh
tests/script/sh/deploy.sh
+6
-2
未找到文件。
include/util/tlog.h
浏览文件 @
6e12d8e7
...
...
@@ -60,7 +60,7 @@ extern int32_t tsdbDebugFlag;
extern
int32_t
tqDebugFlag
;
extern
int32_t
fsDebugFlag
;
extern
int32_t
metaDebugFlag
;
extern
int32_t
fn
DebugFlag
;
extern
int32_t
udf
DebugFlag
;
extern
int32_t
smaDebugFlag
;
extern
int32_t
idxDebugFlag
;
...
...
source/common/src/tglobal.c
浏览文件 @
6e12d8e7
...
...
@@ -314,7 +314,7 @@ static int32_t taosAddServerLogCfg(SConfig *pCfg) {
if
(
cfgAddInt32
(
pCfg
,
"tsdbDebugFlag"
,
tsdbDebugFlag
,
0
,
255
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"tqDebugFlag"
,
tqDebugFlag
,
0
,
255
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"fsDebugFlag"
,
fsDebugFlag
,
0
,
255
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"
fnDebugFlag"
,
fn
DebugFlag
,
0
,
255
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"
udfDebugFlag"
,
udf
DebugFlag
,
0
,
255
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"smaDebugFlag"
,
smaDebugFlag
,
0
,
255
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"idxDebugFlag"
,
idxDebugFlag
,
0
,
255
,
0
)
!=
0
)
return
-
1
;
return
0
;
...
...
@@ -504,7 +504,7 @@ static void taosSetServerLogCfg(SConfig *pCfg) {
tsdbDebugFlag
=
cfgGetItem
(
pCfg
,
"tsdbDebugFlag"
)
->
i32
;
tqDebugFlag
=
cfgGetItem
(
pCfg
,
"tqDebugFlag"
)
->
i32
;
fsDebugFlag
=
cfgGetItem
(
pCfg
,
"fsDebugFlag"
)
->
i32
;
fnDebugFlag
=
cfgGetItem
(
pCfg
,
"fn
DebugFlag"
)
->
i32
;
udfDebugFlag
=
cfgGetItem
(
pCfg
,
"udf
DebugFlag"
)
->
i32
;
smaDebugFlag
=
cfgGetItem
(
pCfg
,
"smaDebugFlag"
)
->
i32
;
idxDebugFlag
=
cfgGetItem
(
pCfg
,
"idxDebugFlag"
)
->
i32
;
}
...
...
@@ -715,8 +715,6 @@ int32_t taosSetCfg(SConfig *pCfg, char* name) {
cfgSetItem
(
pCfg
,
"firstEp"
,
tsFirst
,
pFirstEpItem
->
stype
);
}
else
if
(
strcasecmp
(
"fsDebugFlag"
,
name
)
==
0
)
{
fsDebugFlag
=
cfgGetItem
(
pCfg
,
"fsDebugFlag"
)
->
i32
;
}
else
if
(
strcasecmp
(
"fnDebugFlag"
,
name
)
==
0
)
{
fnDebugFlag
=
cfgGetItem
(
pCfg
,
"fnDebugFlag"
)
->
i32
;
}
break
;
}
...
...
@@ -817,6 +815,8 @@ int32_t taosSetCfg(SConfig *pCfg, char* name) {
case
'u'
:
{
if
(
strcasecmp
(
"multiProcess"
,
name
)
==
0
)
{
tsMultiProcess
=
cfgGetItem
(
pCfg
,
"multiProcess"
)
->
bval
;
}
else
if
(
strcasecmp
(
"udfDebugFlag"
,
name
)
==
0
)
{
udfDebugFlag
=
cfgGetItem
(
pCfg
,
"udfDebugFlag"
)
->
i32
;
}
break
;
}
...
...
source/dnode/mgmt/exe/dmMain.c
浏览文件 @
6e12d8e7
...
...
@@ -216,7 +216,7 @@ int main(int argc, char const *argv[]) {
return
-
1
;
}
dInfo
(
"start to
open dnod
e"
);
dInfo
(
"start to
init servic
e"
);
dmSetSignalHandle
();
int32_t
code
=
dmRun
();
dInfo
(
"shutting down the service"
);
...
...
source/dnode/mgmt/mgmt_vnode/src/vmInt.c
浏览文件 @
6e12d8e7
...
...
@@ -173,7 +173,7 @@ static int32_t vmOpenVnodes(SVnodeMgmt *pMgmt) {
pThread
->
pCfgs
[
pThread
->
vnodeNum
++
]
=
pCfgs
[
v
];
}
dInfo
(
"
start %d threads to open %d vnodes"
,
threadNum
,
numOfVnodes
);
dInfo
(
"
open %d vnodes with %d threads"
,
numOfVnodes
,
threadNum
);
for
(
int32_t
t
=
0
;
t
<
threadNum
;
++
t
)
{
SVnodeThread
*
pThread
=
&
threads
[
t
];
...
...
@@ -204,7 +204,7 @@ static int32_t vmOpenVnodes(SVnodeMgmt *pMgmt) {
dError
(
"there are total vnodes:%d, opened:%d"
,
pMgmt
->
state
.
totalVnodes
,
pMgmt
->
state
.
openVnodes
);
return
-
1
;
}
else
{
dInfo
(
"
total vnodes:%d open successfully
"
,
pMgmt
->
state
.
totalVnodes
);
dInfo
(
"
successfully opened %d vnodes
"
,
pMgmt
->
state
.
totalVnodes
);
return
0
;
}
}
...
...
source/dnode/mgmt/node_mgmt/src/dmMgmt.c
浏览文件 @
6e12d8e7
...
...
@@ -128,7 +128,7 @@ static void dmClearVars(SDnode *pDnode) {
}
int32_t
dmInitDnode
(
SDnode
*
pDnode
,
EDndNodeType
rtype
)
{
d
Info
(
"start to create dnode"
);
d
Debug
(
"start to create dnode"
);
int32_t
code
=
-
1
;
char
path
[
PATH_MAX
+
100
]
=
{
0
};
...
...
source/dnode/mnode/impl/src/mndSync.c
浏览文件 @
6e12d8e7
...
...
@@ -188,7 +188,7 @@ int32_t mndInitSync(SMnode *pMnode) {
SNodeInfo
*
pNode
=
&
pCfg
->
nodeInfo
[
0
];
tstrncpy
(
pNode
->
nodeFqdn
,
pMgmt
->
replica
.
fqdn
,
sizeof
(
pNode
->
nodeFqdn
));
pNode
->
nodePort
=
pMgmt
->
replica
.
port
;
mInfo
(
"
fqdn:%s port
:%u"
,
pNode
->
nodeFqdn
,
pNode
->
nodePort
);
mInfo
(
"
mnode ep:%s
:%u"
,
pNode
->
nodeFqdn
,
pNode
->
nodePort
);
}
tsem_init
(
&
pMgmt
->
syncSem
,
0
,
0
);
...
...
source/libs/function/inc/fnLog.h
浏览文件 @
6e12d8e7
...
...
@@ -10,12 +10,14 @@
extern
"C"
{
#endif
#define fnFatal(...) { if (fnDebugFlag & DEBUG_FATAL) { taosPrintLog("FN FATAL ", DEBUG_FATAL, 255, __VA_ARGS__); }}
#define fnError(...) { if (fnDebugFlag & DEBUG_ERROR) { taosPrintLog("FN ERROR ", DEBUG_ERROR, 255, __VA_ARGS__); }}
#define fnWarn(...) { if (fnDebugFlag & DEBUG_WARN) { taosPrintLog("FN WARN ", DEBUG_WARN, 255, __VA_ARGS__); }}
#define fnInfo(...) { if (fnDebugFlag & DEBUG_INFO) { taosPrintLog("FN ", DEBUG_INFO, 255, __VA_ARGS__); }}
#define fnDebug(...) { if (fnDebugFlag & DEBUG_DEBUG) { taosPrintLog("FN ", DEBUG_DEBUG, dDebugFlag, __VA_ARGS__); }}
#define fnTrace(...) { if (fnDebugFlag & DEBUG_TRACE) { taosPrintLog("FN ", DEBUG_TRACE, dDebugFlag, __VA_ARGS__); }}
// clang-format off
#define fnFatal(...) { if (udfDebugFlag & DEBUG_FATAL) { taosPrintLog("UDF FATAL ", DEBUG_FATAL, 255, __VA_ARGS__); }}
#define fnError(...) { if (udfDebugFlag & DEBUG_ERROR) { taosPrintLog("UDF ERROR ", DEBUG_ERROR, 255, __VA_ARGS__); }}
#define fnWarn(...) { if (udfDebugFlag & DEBUG_WARN) { taosPrintLog("UDF WARN ", DEBUG_WARN, 255, __VA_ARGS__); }}
#define fnInfo(...) { if (udfDebugFlag & DEBUG_INFO) { taosPrintLog("UDF ", DEBUG_INFO, 255, __VA_ARGS__); }}
#define fnDebug(...) { if (udfDebugFlag & DEBUG_DEBUG) { taosPrintLog("UDF ", DEBUG_DEBUG, udfDebugFlag, __VA_ARGS__); }}
#define fnTrace(...) { if (udfDebugFlag & DEBUG_TRACE) { taosPrintLog("UDF ", DEBUG_TRACE, udfDebugFlag, __VA_ARGS__); }}
// clang-format on
#ifdef __cplusplus
}
...
...
source/libs/sync/src/syncMain.c
浏览文件 @
6e12d8e7
...
...
@@ -1025,14 +1025,14 @@ SSyncNode* syncNodeOpen(const SSyncInfo* pOldSyncInfo) {
pSyncNode
->
FpOnSnapshotRsp
=
syncNodeOnSnapshotRspCb
;
if
(
pSyncNode
->
pRaftCfg
->
snapshotStrategy
)
{
sInfo
(
"
sync node use snapshot"
);
sInfo
(
"
vgId:%d, sync node use snapshot"
,
pSyncNode
->
vgId
);
pSyncNode
->
FpOnRequestVote
=
syncNodeOnRequestVoteSnapshotCb
;
pSyncNode
->
FpOnRequestVoteReply
=
syncNodeOnRequestVoteReplySnapshotCb
;
pSyncNode
->
FpOnAppendEntries
=
syncNodeOnAppendEntriesSnapshotCb
;
pSyncNode
->
FpOnAppendEntriesReply
=
syncNodeOnAppendEntriesReplySnapshotCb
;
}
else
{
sInfo
(
"
sync node do not use snapshot"
);
sInfo
(
"
vgId:%d, sync node do not use snapshot"
,
pSyncNode
->
vgId
);
pSyncNode
->
FpOnRequestVote
=
syncNodeOnRequestVoteCb
;
pSyncNode
->
FpOnRequestVoteReply
=
syncNodeOnRequestVoteReplyCb
;
pSyncNode
->
FpOnAppendEntries
=
syncNodeOnAppendEntriesCb
;
...
...
source/util/src/tlog.c
浏览文件 @
6e12d8e7
...
...
@@ -94,7 +94,7 @@ int32_t tdbDebugFlag = 131;
int32_t
tqDebugFlag
=
135
;
int32_t
fsDebugFlag
=
135
;
int32_t
metaDebugFlag
=
135
;
int32_t
fn
DebugFlag
=
135
;
int32_t
udf
DebugFlag
=
135
;
int32_t
smaDebugFlag
=
135
;
int32_t
idxDebugFlag
=
135
;
...
...
@@ -758,7 +758,7 @@ void taosSetAllDebugFlag(int32_t flag) {
tsdbDebugFlag
=
flag
;
tqDebugFlag
=
flag
;
fsDebugFlag
=
flag
;
fn
DebugFlag
=
flag
;
udf
DebugFlag
=
flag
;
smaDebugFlag
=
flag
;
idxDebugFlag
=
flag
;
...
...
tests/script/sh/deploy.sh
浏览文件 @
6e12d8e7
...
...
@@ -134,10 +134,14 @@ echo "cDebugFlag 143" >> $TAOS_CFG
echo
"jniDebugFlag 143"
>>
$TAOS_CFG
echo
"qDebugFlag 143"
>>
$TAOS_CFG
echo
"rpcDebugFlag 143"
>>
$TAOS_CFG
echo
"tmrDebugFlag 131"
>>
$TAOS_CFG
echo
"uDebugFlag 143"
>>
$TAOS_CFG
echo
"sDebugFlag 143"
>>
$TAOS_CFG
echo
"wDebugFlag 143"
>>
$TAOS_CFG
echo
"idxDebugFlag 143"
>>
$TAOS_CFG
echo
"fsDebugFlag 143"
>>
$TAOS_CFG
echo
"udfDebugFlag 143"
>>
$TAOS_CFG
echo
"smaDebugFlag 143"
>>
$TAOS_CFG
echo
"tmrDebugFlag 131"
>>
$TAOS_CFG
echo
"uDebugFlag 131"
>>
$TAOS_CFG
echo
"numOfLogLines 20000000"
>>
$TAOS_CFG
echo
"statusInterval 1"
>>
$TAOS_CFG
echo
"asyncLog 0"
>>
$TAOS_CFG
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录