Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
8ac0fe09
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8ac0fe09
编写于
11月 23, 2020
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add log for user to check; show "System not ready" for not connection
issue;
上级
5a7b938b
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
39 addition
and
1 deletion
+39
-1
src/common/inc/tglobal.h
src/common/inc/tglobal.h
+1
-0
src/common/src/tglobal.c
src/common/src/tglobal.c
+6
-0
src/dnode/src/dnodeCfg.c
src/dnode/src/dnodeCfg.c
+1
-0
src/dnode/src/dnodeMgmt.c
src/dnode/src/dnodeMgmt.c
+22
-0
src/dnode/src/dnodeShell.c
src/dnode/src/dnodeShell.c
+4
-0
src/rpc/src/rpcMain.c
src/rpc/src/rpcMain.c
+3
-1
src/util/inc/tlog.h
src/util/inc/tlog.h
+2
-0
未找到文件。
src/common/inc/tglobal.h
浏览文件 @
8ac0fe09
...
@@ -53,6 +53,7 @@ extern char tsCharset[]; // default encode string
...
@@ -53,6 +53,7 @@ extern char tsCharset[]; // default encode string
extern
int32_t
tsEnableCoreFile
;
extern
int32_t
tsEnableCoreFile
;
extern
int32_t
tsCompressMsgSize
;
extern
int32_t
tsCompressMsgSize
;
extern
char
tsTempDir
[];
extern
char
tsTempDir
[];
extern
int32_t
tsFirstBoot
;
//query buffer management
//query buffer management
extern
int32_t
tsQueryBufferSize
;
// maximum allowed usage buffer for each data node during query processing
extern
int32_t
tsQueryBufferSize
;
// maximum allowed usage buffer for each data node during query processing
...
...
src/common/src/tglobal.c
浏览文件 @
8ac0fe09
...
@@ -60,6 +60,7 @@ char tsCharset[TSDB_LOCALE_LEN] = {0}; // default encode string
...
@@ -60,6 +60,7 @@ char tsCharset[TSDB_LOCALE_LEN] = {0}; // default encode string
int32_t
tsEnableCoreFile
=
0
;
int32_t
tsEnableCoreFile
=
0
;
int32_t
tsMaxBinaryDisplayWidth
=
30
;
int32_t
tsMaxBinaryDisplayWidth
=
30
;
char
tsTempDir
[
TSDB_FILENAME_LEN
]
=
"/tmp/"
;
char
tsTempDir
[
TSDB_FILENAME_LEN
]
=
"/tmp/"
;
int32_t
tsFirstBoot
=
0
;
/*
/*
* denote if the server needs to compress response message at the application layer to client, including query rsp,
* denote if the server needs to compress response message at the application layer to client, including query rsp,
...
@@ -1368,11 +1369,16 @@ int32_t taosCheckGlobalCfg() {
...
@@ -1368,11 +1369,16 @@ int32_t taosCheckGlobalCfg() {
if
(
tsFirst
[
0
]
==
0
)
{
if
(
tsFirst
[
0
]
==
0
)
{
strcpy
(
tsFirst
,
tsLocalEp
);
strcpy
(
tsFirst
,
tsLocalEp
);
taosGetFqdnPortFromEp
(
tsFirst
,
fqdn
,
&
port
);
}
else
{
}
else
{
taosGetFqdnPortFromEp
(
tsFirst
,
fqdn
,
&
port
);
taosGetFqdnPortFromEp
(
tsFirst
,
fqdn
,
&
port
);
snprintf
(
tsFirst
,
sizeof
(
tsFirst
),
"%s:%u"
,
fqdn
,
port
);
snprintf
(
tsFirst
,
sizeof
(
tsFirst
),
"%s:%u"
,
fqdn
,
port
);
}
}
if
(
tscEmbedded
&&
tsFirstBoot
&&
strcmp
(
fqdn
,
tsLocalFqdn
)){
userLog
(
"Dnode %s is goning to join the cluster %s belongs, make sure this is what you want"
,
tsLocalFqdn
,
fqdn
);
}
if
(
tsSecond
[
0
]
==
0
)
{
if
(
tsSecond
[
0
]
==
0
)
{
strcpy
(
tsSecond
,
tsLocalEp
);
strcpy
(
tsSecond
,
tsLocalEp
);
}
else
{
}
else
{
...
...
src/dnode/src/dnodeCfg.c
浏览文件 @
8ac0fe09
...
@@ -91,6 +91,7 @@ static int32_t dnodeReadCfg() {
...
@@ -91,6 +91,7 @@ static int32_t dnodeReadCfg() {
fp
=
fopen
(
file
,
"r"
);
fp
=
fopen
(
file
,
"r"
);
if
(
!
fp
)
{
if
(
!
fp
)
{
dDebug
(
"failed to read %s, file not exist"
,
file
);
dDebug
(
"failed to read %s, file not exist"
,
file
);
tsFirstBoot
=
1
;
goto
PARSE_CFG_OVER
;
goto
PARSE_CFG_OVER
;
}
}
...
...
src/dnode/src/dnodeMgmt.c
浏览文件 @
8ac0fe09
...
@@ -58,6 +58,7 @@ static uint32_t tsRebootTime;
...
@@ -58,6 +58,7 @@ static uint32_t tsRebootTime;
static
taos_qset
tsMgmtQset
=
NULL
;
static
taos_qset
tsMgmtQset
=
NULL
;
static
taos_queue
tsMgmtQueue
=
NULL
;
static
taos_queue
tsMgmtQueue
=
NULL
;
static
pthread_t
tsQthread
;
static
pthread_t
tsQthread
;
static
uint32_t
tsNumOfLostConn
=
0
;
static
void
dnodeProcessStatusRsp
(
SRpcMsg
*
pMsg
);
static
void
dnodeProcessStatusRsp
(
SRpcMsg
*
pMsg
);
static
void
dnodeSendStatusMsg
(
void
*
handle
,
void
*
tmrId
);
static
void
dnodeSendStatusMsg
(
void
*
handle
,
void
*
tmrId
);
...
@@ -467,10 +468,31 @@ static int32_t dnodeProcessCreateMnodeMsg(SRpcMsg *pMsg) {
...
@@ -467,10 +468,31 @@ static int32_t dnodeProcessCreateMnodeMsg(SRpcMsg *pMsg) {
static
void
dnodeProcessStatusRsp
(
SRpcMsg
*
pMsg
)
{
static
void
dnodeProcessStatusRsp
(
SRpcMsg
*
pMsg
)
{
if
(
pMsg
->
code
!=
TSDB_CODE_SUCCESS
)
{
if
(
pMsg
->
code
!=
TSDB_CODE_SUCCESS
)
{
dError
(
"status rsp is received, error:%s"
,
tstrerror
(
pMsg
->
code
));
dError
(
"status rsp is received, error:%s"
,
tstrerror
(
pMsg
->
code
));
if
(
pMsg
->
code
==
TSDB_CODE_RPC_NETWORK_UNAVAIL
)
{
tsNumOfLostConn
++
;
if
(
tsNumOfLostConn
&&
(
tsNumOfLostConn
%
10
==
0
))
{
if
(
tsFirstBoot
)
{
userLog
(
"Dnode has not joined the cluster yet, check the network/configuration and the other dnode status in cluster"
);
}
else
{
userLog
(
"Dnode lost connection to the mnode, check the network and the other dnode status in cluster"
);
}
}
}
taosTmrReset
(
dnodeSendStatusMsg
,
tsStatusInterval
*
1000
,
NULL
,
tsDnodeTmr
,
&
tsStatusTimer
);
taosTmrReset
(
dnodeSendStatusMsg
,
tsStatusInterval
*
1000
,
NULL
,
tsDnodeTmr
,
&
tsStatusTimer
);
return
;
return
;
}
}
if
(
tsNumOfLostConn
)
{
if
(
tsNumOfLostConn
>=
10
)
{
if
(
tsFirstBoot
)
{
userLog
(
"Done has joined the cluster now"
);
}
else
{
userLog
(
"Dnode's connection to the mnode is ok now"
);
}
}
tsNumOfLostConn
=
0
;
}
SStatusRsp
*
pStatusRsp
=
pMsg
->
pCont
;
SStatusRsp
*
pStatusRsp
=
pMsg
->
pCont
;
SMnodeInfos
*
minfos
=
&
pStatusRsp
->
mnodes
;
SMnodeInfos
*
minfos
=
&
pStatusRsp
->
mnodes
;
dnodeUpdateMInfos
(
minfos
);
dnodeUpdateMInfos
(
minfos
);
...
...
src/dnode/src/dnodeShell.c
浏览文件 @
8ac0fe09
...
@@ -160,6 +160,10 @@ static int dnodeRetrieveUserAuthInfo(char *user, char *spi, char *encrypt, char
...
@@ -160,6 +160,10 @@ static int dnodeRetrieveUserAuthInfo(char *user, char *spi, char *encrypt, char
if
(
rpcRsp
.
code
!=
0
)
{
if
(
rpcRsp
.
code
!=
0
)
{
dError
(
"user:%s, auth msg received from mnodes, error:%s"
,
user
,
tstrerror
(
rpcRsp
.
code
));
dError
(
"user:%s, auth msg received from mnodes, error:%s"
,
user
,
tstrerror
(
rpcRsp
.
code
));
if
(
rpcRsp
.
code
==
TSDB_CODE_RPC_NETWORK_UNAVAIL
)
{
dError
(
"all mnodes unreachable, dnode not ready"
);
rpcRsp
.
code
=
TSDB_CODE_RPC_NOT_READY
;
}
}
else
{
}
else
{
SAuthRsp
*
pRsp
=
rpcRsp
.
pCont
;
SAuthRsp
*
pRsp
=
rpcRsp
.
pCont
;
dDebug
(
"user:%s, auth msg received from mnodes"
,
user
);
dDebug
(
"user:%s, auth msg received from mnodes"
,
user
);
...
...
src/rpc/src/rpcMain.c
浏览文件 @
8ac0fe09
...
@@ -1372,7 +1372,9 @@ static void rpcProcessRetryTimer(void *param, void *tmrId) {
...
@@ -1372,7 +1372,9 @@ static void rpcProcessRetryTimer(void *param, void *tmrId) {
// close the connection
// close the connection
tDebug
(
"%s, failed to send msg:%s to %s:%hu"
,
pConn
->
info
,
taosMsg
[
pConn
->
outType
],
pConn
->
peerFqdn
,
pConn
->
peerPort
);
tDebug
(
"%s, failed to send msg:%s to %s:%hu"
,
pConn
->
info
,
taosMsg
[
pConn
->
outType
],
pConn
->
peerFqdn
,
pConn
->
peerPort
);
if
(
pConn
->
pContext
)
{
if
(
pConn
->
pContext
)
{
pConn
->
pContext
->
code
=
TSDB_CODE_RPC_NETWORK_UNAVAIL
;
if
(
pConn
->
pContext
->
code
==
0
)
{
pConn
->
pContext
->
code
=
TSDB_CODE_RPC_NETWORK_UNAVAIL
;
}
pConn
->
pContext
->
pConn
=
NULL
;
pConn
->
pContext
->
pConn
=
NULL
;
pConn
->
pReqMsg
=
NULL
;
pConn
->
pReqMsg
=
NULL
;
taosTmrStart
(
rpcProcessConnError
,
0
,
pConn
->
pContext
,
pRpc
->
tmrCtrl
);
taosTmrStart
(
rpcProcessConnError
,
0
,
pConn
->
pContext
,
pRpc
->
tmrCtrl
);
...
...
src/util/inc/tlog.h
浏览文件 @
8ac0fe09
...
@@ -49,6 +49,8 @@ void taosPrintLongString(const char * flags, int32_t dflag, const char *forma
...
@@ -49,6 +49,8 @@ void taosPrintLongString(const char * flags, int32_t dflag, const char *forma
void
taosDumpData
(
unsigned
char
*
msg
,
int32_t
len
);
void
taosDumpData
(
unsigned
char
*
msg
,
int32_t
len
);
#define userLog(...) { taosPrintLog("USR ", 255, __VA_ARGS__); }
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录