Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
19e3f91d
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
19e3f91d
编写于
1月 10, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
minor changes
上级
2af3b3a2
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
49 addition
and
48 deletion
+49
-48
include/common/tmsg.h
include/common/tmsg.h
+10
-10
source/dnode/mgmt/impl/inc/dndInt.h
source/dnode/mgmt/impl/inc/dndInt.h
+2
-2
source/dnode/mgmt/impl/src/dndMgmt.c
source/dnode/mgmt/impl/src/dndMgmt.c
+2
-2
source/dnode/mgmt/impl/src/dnode.c
source/dnode/mgmt/impl/src/dnode.c
+3
-3
source/dnode/mnode/impl/src/mndDb.c
source/dnode/mnode/impl/src/mndDb.c
+8
-7
source/dnode/mnode/impl/src/mndFunc.c
source/dnode/mnode/impl/src/mndFunc.c
+5
-5
source/dnode/mnode/impl/test/db/db.cpp
source/dnode/mnode/impl/test/db/db.cpp
+8
-8
source/libs/parser/src/dCDAstProcess.c
source/libs/parser/src/dCDAstProcess.c
+4
-4
source/libs/qcom/src/querymsg.c
source/libs/qcom/src/querymsg.c
+2
-2
tools/shell/src/backup/tnettest.c
tools/shell/src/backup/tnettest.c
+5
-5
未找到文件。
include/common/tmsg.h
浏览文件 @
19e3f91d
...
...
@@ -667,25 +667,25 @@ typedef struct {
int8_t
walLevel
;
int8_t
quorum
;
int8_t
cacheLastRow
;
}
SAlterDb
Msg
;
}
SAlterDb
Req
;
typedef
struct
{
char
db
[
TSDB_TABLE_FNAME_LEN
];
int8_t
ignoreNotExists
;
}
SDropDb
Msg
;
}
SDropDb
Req
;
typedef
struct
{
char
db
[
TSDB_TABLE_FNAME_LEN
];
int32_t
vgVersion
;
}
SUseDb
Msg
;
}
SUseDb
Req
;
typedef
struct
{
char
db
[
TSDB_TABLE_FNAME_LEN
];
}
SSyncDb
Msg
;
}
SSyncDb
Req
;
typedef
struct
{
char
db
[
TSDB_TABLE_FNAME_LEN
];
}
SCompactDb
Msg
;
}
SCompactDb
Req
;
typedef
struct
{
char
name
[
TSDB_FUNC_NAME_LEN
];
...
...
@@ -699,16 +699,16 @@ typedef struct {
int32_t
commentSize
;
int32_t
codeSize
;
char
pCont
[];
}
SCreateFunc
Msg
;
}
SCreateFunc
Req
;
typedef
struct
{
char
name
[
TSDB_FUNC_NAME_LEN
];
}
SDropFunc
Msg
;
}
SDropFunc
Req
;
typedef
struct
{
int32_t
numOfFuncs
;
char
pFuncNames
[];
}
SRetrieveFunc
Msg
;
}
SRetrieveFunc
Req
;
typedef
struct
{
char
name
[
TSDB_FUNC_NAME_LEN
];
...
...
@@ -932,7 +932,7 @@ typedef struct {
char
db
[
TSDB_DB_FNAME_LEN
];
int32_t
numOfVgroup
;
int32_t
vgid
[];
}
SCompact
Msg
;
}
SCompact
Req
;
typedef
struct
SShowRsp
{
int64_t
showId
;
...
...
@@ -1042,7 +1042,7 @@ typedef struct {
int8_t
align
[
7
];
char
name
[
TSDB_STEP_NAME_LEN
];
char
desc
[
TSDB_STEP_DESC_LEN
];
}
SStartup
Msg
;
}
SStartup
Req
;
// mq related
typedef
struct
{
...
...
source/dnode/mgmt/impl/inc/dndInt.h
浏览文件 @
19e3f91d
...
...
@@ -167,7 +167,7 @@ typedef struct SDnode {
SBnodeMgmt
bmgmt
;
SVnodesMgmt
vmgmt
;
STransMgmt
tmgmt
;
SStartup
Msg
startup
;
SStartup
Req
startup
;
}
SDnode
;
EStat
dndGetStat
(
SDnode
*
pDnode
);
...
...
@@ -175,7 +175,7 @@ void dndSetStat(SDnode *pDnode, EStat stat);
char
*
dndStatStr
(
EStat
stat
);
void
dndReportStartup
(
SDnode
*
pDnode
,
char
*
pName
,
char
*
pDesc
);
void
dndGetStartup
(
SDnode
*
pDnode
,
SStartup
Msg
*
pStartup
);
void
dndGetStartup
(
SDnode
*
pDnode
,
SStartup
Req
*
pStartup
);
#ifdef __cplusplus
}
...
...
source/dnode/mgmt/impl/src/dndMgmt.c
浏览文件 @
19e3f91d
...
...
@@ -473,12 +473,12 @@ static int32_t dndProcessConfigDnodeReq(SDnode *pDnode, SRpcMsg *pReq) {
void
dndProcessStartupReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pReq
)
{
dDebug
(
"startup req is received"
);
SStartup
Msg
*
pStartup
=
rpcMallocCont
(
sizeof
(
SStartupMsg
));
SStartup
Req
*
pStartup
=
rpcMallocCont
(
sizeof
(
SStartupReq
));
dndGetStartup
(
pDnode
,
pStartup
);
dDebug
(
"startup req is sent, step:%s desc:%s finished:%d"
,
pStartup
->
name
,
pStartup
->
desc
,
pStartup
->
finished
);
SRpcMsg
rpcRsp
=
{.
handle
=
pReq
->
handle
,
.
pCont
=
pStartup
,
.
contLen
=
sizeof
(
SStartup
Msg
)};
SRpcMsg
rpcRsp
=
{.
handle
=
pReq
->
handle
,
.
pCont
=
pStartup
,
.
contLen
=
sizeof
(
SStartup
Req
)};
rpcSendResponse
(
&
rpcRsp
);
}
...
...
source/dnode/mgmt/impl/src/dnode.c
浏览文件 @
19e3f91d
...
...
@@ -45,14 +45,14 @@ char *dndStatStr(EStat stat) {
}
void
dndReportStartup
(
SDnode
*
pDnode
,
char
*
pName
,
char
*
pDesc
)
{
SStartup
Msg
*
pStartup
=
&
pDnode
->
startup
;
SStartup
Req
*
pStartup
=
&
pDnode
->
startup
;
tstrncpy
(
pStartup
->
name
,
pName
,
TSDB_STEP_NAME_LEN
);
tstrncpy
(
pStartup
->
desc
,
pDesc
,
TSDB_STEP_DESC_LEN
);
pStartup
->
finished
=
0
;
}
void
dndGetStartup
(
SDnode
*
pDnode
,
SStartup
Msg
*
pStartup
)
{
memcpy
(
pStartup
,
&
pDnode
->
startup
,
sizeof
(
SStartup
Msg
));
void
dndGetStartup
(
SDnode
*
pDnode
,
SStartup
Req
*
pStartup
)
{
memcpy
(
pStartup
,
&
pDnode
->
startup
,
sizeof
(
SStartup
Req
));
pStartup
->
finished
=
(
dndGetStat
(
pDnode
)
==
DND_STAT_RUNNING
);
}
...
...
source/dnode/mnode/impl/src/mndDb.c
浏览文件 @
19e3f91d
...
...
@@ -194,7 +194,7 @@ static int32_t mndDbActionUpdate(SSdb *pSdb, SDbObj *pOld, SDbObj *pNew) {
SDbObj
*
mndAcquireDb
(
SMnode
*
pMnode
,
char
*
db
)
{
SSdb
*
pSdb
=
pMnode
->
pSdb
;
SDbObj
*
pDb
=
sdbAcquire
(
pSdb
,
SDB_DB
,
db
);
if
(
pDb
==
NULL
)
{
if
(
pDb
==
NULL
&&
terrno
==
TSDB_CODE_SDB_OBJ_NOT_THERE
)
{
terrno
=
TSDB_CODE_MND_DB_NOT_EXIST
;
}
return
pDb
;
...
...
@@ -495,7 +495,7 @@ static int32_t mndProcessCreateDbReq(SMnodeMsg *pReq) {
return
TSDB_CODE_MND_ACTION_IN_PROGRESS
;
}
static
int32_t
mndSetDbCfgFromAlterDbMsg
(
SDbObj
*
pDb
,
SAlterDb
Msg
*
pAlter
)
{
static
int32_t
mndSetDbCfgFromAlterDbMsg
(
SDbObj
*
pDb
,
SAlterDb
Req
*
pAlter
)
{
terrno
=
TSDB_CODE_MND_DB_OPTION_UNCHANGED
;
if
(
pAlter
->
totalBlocks
>=
0
&&
pAlter
->
totalBlocks
!=
pDb
->
cfg
.
totalBlocks
)
{
...
...
@@ -646,7 +646,7 @@ UPDATE_DB_OVER:
static
int32_t
mndProcessAlterDbReq
(
SMnodeMsg
*
pReq
)
{
SMnode
*
pMnode
=
pReq
->
pMnode
;
SAlterDb
Msg
*
pAlter
=
pReq
->
rpcMsg
.
pCont
;
SAlterDb
Req
*
pAlter
=
pReq
->
rpcMsg
.
pCont
;
pAlter
->
totalBlocks
=
htonl
(
pAlter
->
totalBlocks
);
pAlter
->
daysToKeep0
=
htonl
(
pAlter
->
daysToKeep0
);
pAlter
->
daysToKeep1
=
htonl
(
pAlter
->
daysToKeep1
);
...
...
@@ -793,7 +793,7 @@ DROP_DB_OVER:
static
int32_t
mndProcessDropDbReq
(
SMnodeMsg
*
pReq
)
{
SMnode
*
pMnode
=
pReq
->
pMnode
;
SDropDb
Msg
*
pDrop
=
pReq
->
rpcMsg
.
pCont
;
SDropDb
Req
*
pDrop
=
pReq
->
rpcMsg
.
pCont
;
mDebug
(
"db:%s, start to drop"
,
pDrop
->
db
);
...
...
@@ -823,7 +823,7 @@ static int32_t mndProcessDropDbReq(SMnodeMsg *pReq) {
static
int32_t
mndProcessUseDbReq
(
SMnodeMsg
*
pReq
)
{
SMnode
*
pMnode
=
pReq
->
pMnode
;
SSdb
*
pSdb
=
pMnode
->
pSdb
;
SUseDb
Msg
*
pUse
=
pReq
->
rpcMsg
.
pCont
;
SUseDb
Req
*
pUse
=
pReq
->
rpcMsg
.
pCont
;
pUse
->
vgVersion
=
htonl
(
pUse
->
vgVersion
);
SDbObj
*
pDb
=
mndAcquireDb
(
pMnode
,
pUse
->
db
);
...
...
@@ -836,6 +836,7 @@ static int32_t mndProcessUseDbReq(SMnodeMsg *pReq) {
int32_t
contLen
=
sizeof
(
SUseDbRsp
)
+
pDb
->
cfg
.
numOfVgroups
*
sizeof
(
SVgroupInfo
);
SUseDbRsp
*
pRsp
=
rpcMallocCont
(
contLen
);
if
(
pRsp
==
NULL
)
{
mndReleaseDb
(
pMnode
,
pDb
);
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
return
-
1
;
}
...
...
@@ -890,7 +891,7 @@ static int32_t mndProcessUseDbReq(SMnodeMsg *pReq) {
static
int32_t
mndProcessSyncDbReq
(
SMnodeMsg
*
pReq
)
{
SMnode
*
pMnode
=
pReq
->
pMnode
;
SSyncDb
Msg
*
pSync
=
pReq
->
rpcMsg
.
pCont
;
SSyncDb
Req
*
pSync
=
pReq
->
rpcMsg
.
pCont
;
SDbObj
*
pDb
=
mndAcquireDb
(
pMnode
,
pSync
->
db
);
if
(
pDb
==
NULL
)
{
mError
(
"db:%s, failed to process sync db req since %s"
,
pSync
->
db
,
terrstr
());
...
...
@@ -903,7 +904,7 @@ static int32_t mndProcessSyncDbReq(SMnodeMsg *pReq) {
static
int32_t
mndProcessCompactDbReq
(
SMnodeMsg
*
pReq
)
{
SMnode
*
pMnode
=
pReq
->
pMnode
;
SCompactDb
Msg
*
pCompact
=
pReq
->
rpcMsg
.
pCont
;
SCompactDb
Req
*
pCompact
=
pReq
->
rpcMsg
.
pCont
;
SDbObj
*
pDb
=
mndAcquireDb
(
pMnode
,
pCompact
->
db
);
if
(
pDb
==
NULL
)
{
mError
(
"db:%s, failed to process compact db req since %s"
,
pCompact
->
db
,
terrstr
());
...
...
source/dnode/mnode/impl/src/mndFunc.c
浏览文件 @
19e3f91d
...
...
@@ -26,7 +26,7 @@ static SSdbRow *mndFuncActionDecode(SSdbRaw *pRaw);
static
int32_t
mndFuncActionInsert
(
SSdb
*
pSdb
,
SFuncObj
*
pFunc
);
static
int32_t
mndFuncActionDelete
(
SSdb
*
pSdb
,
SFuncObj
*
pFunc
);
static
int32_t
mndFuncActionUpdate
(
SSdb
*
pSdb
,
SFuncObj
*
pOldFunc
,
SFuncObj
*
pNewFunc
);
static
int32_t
mndCreateFunc
(
SMnode
*
pMnode
,
SMnodeMsg
*
pMsg
,
SCreateFunc
Msg
*
pCreate
);
static
int32_t
mndCreateFunc
(
SMnode
*
pMnode
,
SMnodeMsg
*
pMsg
,
SCreateFunc
Req
*
pCreate
);
static
int32_t
mndDropFunc
(
SMnode
*
pMnode
,
SMnodeMsg
*
pMsg
,
SFuncObj
*
pFunc
);
static
int32_t
mndProcessCreateFuncMsg
(
SMnodeMsg
*
pMsg
);
static
int32_t
mndProcessDropFuncMsg
(
SMnodeMsg
*
pMsg
);
...
...
@@ -156,7 +156,7 @@ static int32_t mndFuncActionUpdate(SSdb *pSdb, SFuncObj *pOldFunc, SFuncObj *pNe
return
0
;
}
static
int32_t
mndCreateFunc
(
SMnode
*
pMnode
,
SMnodeMsg
*
pMsg
,
SCreateFunc
Msg
*
pCreate
)
{
static
int32_t
mndCreateFunc
(
SMnode
*
pMnode
,
SMnodeMsg
*
pMsg
,
SCreateFunc
Req
*
pCreate
)
{
SFuncObj
*
pFunc
=
calloc
(
1
,
sizeof
(
SFuncObj
)
+
pCreate
->
commentSize
+
pCreate
->
codeSize
);
pFunc
->
createdTime
=
taosGetTimestampMs
();
pFunc
->
funcType
=
pCreate
->
funcType
;
...
...
@@ -264,7 +264,7 @@ static int32_t mndDropFunc(SMnode *pMnode, SMnodeMsg *pMsg, SFuncObj *pFunc) {
static
int32_t
mndProcessCreateFuncMsg
(
SMnodeMsg
*
pMsg
)
{
SMnode
*
pMnode
=
pMsg
->
pMnode
;
SCreateFunc
Msg
*
pCreate
=
pMsg
->
rpcMsg
.
pCont
;
SCreateFunc
Req
*
pCreate
=
pMsg
->
rpcMsg
.
pCont
;
pCreate
->
outputLen
=
htonl
(
pCreate
->
outputLen
);
pCreate
->
bufSize
=
htonl
(
pCreate
->
bufSize
);
pCreate
->
sigature
=
htobe64
(
pCreate
->
sigature
);
...
...
@@ -323,7 +323,7 @@ static int32_t mndProcessCreateFuncMsg(SMnodeMsg *pMsg) {
static
int32_t
mndProcessDropFuncMsg
(
SMnodeMsg
*
pMsg
)
{
SMnode
*
pMnode
=
pMsg
->
pMnode
;
SDropFunc
Msg
*
pDrop
=
pMsg
->
rpcMsg
.
pCont
;
SDropFunc
Req
*
pDrop
=
pMsg
->
rpcMsg
.
pCont
;
mDebug
(
"func:%s, start to drop"
,
pDrop
->
name
);
...
...
@@ -353,7 +353,7 @@ static int32_t mndProcessDropFuncMsg(SMnodeMsg *pMsg) {
static
int32_t
mndProcessRetrieveFuncMsg
(
SMnodeMsg
*
pMsg
)
{
SMnode
*
pMnode
=
pMsg
->
pMnode
;
SRetrieveFunc
Msg
*
pRetrieve
=
pMsg
->
rpcMsg
.
pCont
;
SRetrieveFunc
Req
*
pRetrieve
=
pMsg
->
rpcMsg
.
pCont
;
pRetrieve
->
numOfFuncs
=
htonl
(
pRetrieve
->
numOfFuncs
);
int32_t
size
=
sizeof
(
SRetrieveFuncRsp
)
+
(
sizeof
(
SFuncInfo
)
+
TSDB_FUNC_CODE_LEN
)
*
pRetrieve
->
numOfFuncs
+
16384
;
...
...
source/dnode/mnode/impl/test/db/db.cpp
浏览文件 @
19e3f91d
...
...
@@ -136,9 +136,9 @@ TEST_F(MndTestDb, 02_Create_Alter_Drop_Db) {
CheckBinary
(
"master"
,
9
);
{
int32_t
contLen
=
sizeof
(
SAlterDb
Msg
);
int32_t
contLen
=
sizeof
(
SAlterDb
Req
);
SAlterDb
Msg
*
pReq
=
(
SAlterDbMsg
*
)
rpcMallocCont
(
contLen
);
SAlterDb
Req
*
pReq
=
(
SAlterDbReq
*
)
rpcMallocCont
(
contLen
);
strcpy
(
pReq
->
db
,
"1.d1"
);
pReq
->
totalBlocks
=
htonl
(
12
);
pReq
->
daysToKeep0
=
htonl
(
300
);
...
...
@@ -205,9 +205,9 @@ TEST_F(MndTestDb, 02_Create_Alter_Drop_Db) {
CheckInt8
(
0
);
// update
{
int32_t
contLen
=
sizeof
(
SDropDb
Msg
);
int32_t
contLen
=
sizeof
(
SDropDb
Req
);
SDropDb
Msg
*
pReq
=
(
SDropDbMsg
*
)
rpcMallocCont
(
contLen
);
SDropDb
Req
*
pReq
=
(
SDropDbReq
*
)
rpcMallocCont
(
contLen
);
strcpy
(
pReq
->
db
,
"1.d1"
);
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_MND_DROP_DB
,
pReq
,
contLen
);
...
...
@@ -261,9 +261,9 @@ TEST_F(MndTestDb, 03_Create_Use_Restart_Use_Db) {
CheckBinary
(
"d2"
,
TSDB_DB_NAME_LEN
-
1
);
{
int32_t
contLen
=
sizeof
(
SUseDb
Msg
);
int32_t
contLen
=
sizeof
(
SUseDb
Req
);
SUseDb
Msg
*
pReq
=
(
SUseDbMsg
*
)
rpcMallocCont
(
contLen
);
SUseDb
Req
*
pReq
=
(
SUseDbReq
*
)
rpcMallocCont
(
contLen
);
strcpy
(
pReq
->
db
,
"1.d2"
);
pReq
->
vgVersion
=
htonl
(
-
1
);
...
...
@@ -314,9 +314,9 @@ TEST_F(MndTestDb, 03_Create_Use_Restart_Use_Db) {
}
{
int32_t
contLen
=
sizeof
(
SDropDb
Msg
);
int32_t
contLen
=
sizeof
(
SDropDb
Req
);
SDropDb
Msg
*
pReq
=
(
SDropDbMsg
*
)
rpcMallocCont
(
contLen
);
SDropDb
Req
*
pReq
=
(
SDropDbReq
*
)
rpcMallocCont
(
contLen
);
strcpy
(
pReq
->
db
,
"1.d2"
);
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_MND_DROP_DB
,
pReq
,
contLen
);
...
...
source/libs/parser/src/dCDAstProcess.c
浏览文件 @
19e3f91d
...
...
@@ -842,11 +842,11 @@ SDclStmtInfo* qParserValidateDclSqlNode(SSqlInfo* pInfo, SParseBasicCtx* pCtx, c
goto
_error
;
}
SUseDb
Msg
*
pUseDbMsg
=
(
SUseDbMsg
*
)
calloc
(
1
,
sizeof
(
SUseDbMsg
));
SUseDb
Req
*
pUseDbMsg
=
(
SUseDbReq
*
)
calloc
(
1
,
sizeof
(
SUseDbReq
));
tNameExtractFullName
(
&
n
,
pUseDbMsg
->
db
);
pDcl
->
pMsg
=
(
char
*
)
pUseDbMsg
;
pDcl
->
msgLen
=
sizeof
(
SUseDb
Msg
);
pDcl
->
msgLen
=
sizeof
(
SUseDb
Req
);
pDcl
->
msgType
=
TDMT_MND_USE_DB
;
break
;
}
...
...
@@ -895,14 +895,14 @@ SDclStmtInfo* qParserValidateDclSqlNode(SSqlInfo* pInfo, SParseBasicCtx* pCtx, c
goto
_error
;
}
SDropDb
Msg
*
pDropDbMsg
=
(
SDropDbMsg
*
)
calloc
(
1
,
sizeof
(
SDropDbMsg
));
SDropDb
Req
*
pDropDbMsg
=
(
SDropDbReq
*
)
calloc
(
1
,
sizeof
(
SDropDbReq
));
code
=
tNameExtractFullName
(
&
name
,
pDropDbMsg
->
db
);
pDropDbMsg
->
ignoreNotExists
=
pInfo
->
pMiscInfo
->
existsCheck
?
1
:
0
;
assert
(
code
==
TSDB_CODE_SUCCESS
&&
name
.
type
==
TSDB_DB_NAME_T
);
pDcl
->
msgType
=
TDMT_MND_DROP_DB
;
pDcl
->
msgLen
=
sizeof
(
SDropDb
Msg
);
pDcl
->
msgLen
=
sizeof
(
SDropDb
Req
);
pDcl
->
pMsg
=
(
char
*
)
pDropDbMsg
;
break
;
}
...
...
source/libs/qcom/src/querymsg.c
浏览文件 @
19e3f91d
...
...
@@ -59,7 +59,7 @@ int32_t queryBuildUseDbMsg(void* input, char **msg, int32_t msgSize, int32_t *ms
SBuildUseDBInput
*
bInput
=
(
SBuildUseDBInput
*
)
input
;
int32_t
estimateSize
=
sizeof
(
SUseDb
Msg
);
int32_t
estimateSize
=
sizeof
(
SUseDb
Req
);
if
(
NULL
==
*
msg
||
msgSize
<
estimateSize
)
{
tfree
(
*
msg
);
*
msg
=
rpcMallocCont
(
estimateSize
);
...
...
@@ -68,7 +68,7 @@ int32_t queryBuildUseDbMsg(void* input, char **msg, int32_t msgSize, int32_t *ms
}
}
SUseDb
Msg
*
bMsg
=
(
SUseDbMsg
*
)
*
msg
;
SUseDb
Req
*
bMsg
=
(
SUseDbReq
*
)
*
msg
;
strncpy
(
bMsg
->
db
,
bInput
->
db
,
sizeof
(
bMsg
->
db
));
bMsg
->
db
[
sizeof
(
bMsg
->
db
)
-
1
]
=
0
;
...
...
tools/shell/src/backup/tnettest.c
浏览文件 @
19e3f91d
...
...
@@ -338,7 +338,7 @@ void *taosNetInitRpc(char *secretEncrypt, char spi) {
return
pRpcConn
;
}
static
int32_t
taosNetCheckRpc
(
const
char
*
serverFqdn
,
uint16_t
port
,
uint16_t
pktLen
,
char
spi
,
SStartup
Msg
*
pStep
)
{
static
int32_t
taosNetCheckRpc
(
const
char
*
serverFqdn
,
uint16_t
port
,
uint16_t
pktLen
,
char
spi
,
SStartup
Req
*
pStep
)
{
SRpcEpSet
epSet
;
SRpcMsg
reqMsg
;
SRpcMsg
rspMsg
;
...
...
@@ -374,7 +374,7 @@ static int32_t taosNetCheckRpc(const char* serverFqdn, uint16_t port, uint16_t p
}
int32_t
code
=
0
;
if
(
pStep
!=
NULL
&&
rspMsg
.
pCont
!=
NULL
&&
rspMsg
.
contLen
>
0
&&
rspMsg
.
contLen
<=
sizeof
(
SStartup
Msg
))
{
if
(
pStep
!=
NULL
&&
rspMsg
.
pCont
!=
NULL
&&
rspMsg
.
contLen
>
0
&&
rspMsg
.
contLen
<=
sizeof
(
SStartup
Req
))
{
memcpy
(
pStep
,
rspMsg
.
pCont
,
rspMsg
.
contLen
);
code
=
1
;
}
...
...
@@ -384,8 +384,8 @@ static int32_t taosNetCheckRpc(const char* serverFqdn, uint16_t port, uint16_t p
return
code
;
}
static
int32_t
taosNetParseStartup
(
SStartup
Msg
*
pCont
)
{
SStartup
Msg
*
pStep
=
pCont
;
static
int32_t
taosNetParseStartup
(
SStartup
Req
*
pCont
)
{
SStartup
Req
*
pStep
=
pCont
;
uInfo
(
"step:%s desc:%s"
,
pStep
->
name
,
pStep
->
desc
);
if
(
pStep
->
finished
)
{
...
...
@@ -398,7 +398,7 @@ static int32_t taosNetParseStartup(SStartupMsg *pCont) {
static
void
taosNetTestStartup
(
char
*
host
,
int32_t
port
)
{
uInfo
(
"check startup, host:%s port:%d
\n
"
,
host
,
port
);
SStartup
Msg
*
pStep
=
malloc
(
sizeof
(
SStartupMsg
));
SStartup
Req
*
pStep
=
malloc
(
sizeof
(
SStartupReq
));
while
(
1
)
{
int32_t
code
=
taosNetCheckRpc
(
host
,
port
+
TSDB_PORT_DNODEDNODE
,
20
,
0
,
pStep
);
if
(
code
>
0
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录