Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
172a7c9a
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
未验证
提交
172a7c9a
编写于
9月 29, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
9月 29, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #17164 from taosdata/fix/TD-19245
fix: coverity issues
上级
8aa5100d
3be4a2ed
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
39 addition
and
27 deletion
+39
-27
include/libs/sync/sync.h
include/libs/sync/sync.h
+1
-1
source/dnode/mgmt/node_mgmt/src/dmProc.c
source/dnode/mgmt/node_mgmt/src/dmProc.c
+3
-0
source/dnode/mgmt/node_mgmt/src/dmTransport.c
source/dnode/mgmt/node_mgmt/src/dmTransport.c
+1
-1
source/dnode/mnode/impl/src/mndAcct.c
source/dnode/mnode/impl/src/mndAcct.c
+1
-0
source/dnode/mnode/impl/src/mndCluster.c
source/dnode/mnode/impl/src/mndCluster.c
+1
-1
source/dnode/mnode/impl/src/mndSync.c
source/dnode/mnode/impl/src/mndSync.c
+11
-6
source/dnode/mnode/impl/src/mndTopic.c
source/dnode/mnode/impl/src/mndTopic.c
+1
-1
source/dnode/mnode/impl/src/mndTrans.c
source/dnode/mnode/impl/src/mndTrans.c
+4
-2
source/dnode/mnode/impl/src/mndUser.c
source/dnode/mnode/impl/src/mndUser.c
+1
-0
source/dnode/mnode/impl/src/mndVgroup.c
source/dnode/mnode/impl/src/mndVgroup.c
+4
-4
source/dnode/vnode/src/vnd/vnodeSync.c
source/dnode/vnode/src/vnd/vnodeSync.c
+4
-4
source/libs/sync/src/syncMain.c
source/libs/sync/src/syncMain.c
+1
-1
source/libs/sync/test/syncConfigChangeSnapshotTest.cpp
source/libs/sync/test/syncConfigChangeSnapshotTest.cpp
+2
-2
source/libs/sync/test/syncConfigChangeTest.cpp
source/libs/sync/test/syncConfigChangeTest.cpp
+2
-2
source/libs/sync/test/syncTestTool.cpp
source/libs/sync/test/syncTestTool.cpp
+2
-2
未找到文件。
include/libs/sync/sync.h
浏览文件 @
172a7c9a
...
...
@@ -132,7 +132,7 @@ typedef struct SSyncFSM {
void
(
*
FpRollBackCb
)(
struct
SSyncFSM
*
pFsm
,
const
SRpcMsg
*
pMsg
,
SFsmCbMeta
cbMeta
);
void
(
*
FpRestoreFinishCb
)(
struct
SSyncFSM
*
pFsm
);
void
(
*
FpReConfigCb
)(
struct
SSyncFSM
*
pFsm
,
const
SRpcMsg
*
pMsg
,
SReConfigCbMeta
cbMeta
);
void
(
*
FpReConfigCb
)(
struct
SSyncFSM
*
pFsm
,
const
SRpcMsg
*
pMsg
,
SReConfigCbMeta
*
cbMeta
);
void
(
*
FpLeaderTransferCb
)(
struct
SSyncFSM
*
pFsm
,
const
SRpcMsg
*
pMsg
,
SFsmCbMeta
cbMeta
);
void
(
*
FpBecomeLeaderCb
)(
struct
SSyncFSM
*
pFsm
);
...
...
source/dnode/mgmt/node_mgmt/src/dmProc.c
浏览文件 @
172a7c9a
...
...
@@ -74,11 +74,14 @@ static SProcQueue *dmInitProcQueue(SProc *proc, char *ptr, int32_t size) {
}
tstrncpy
(
queue
->
name
,
proc
->
name
,
sizeof
(
queue
->
name
));
taosThreadMutexLock
(
&
queue
->
mutex
);
queue
->
head
=
0
;
queue
->
tail
=
0
;
queue
->
total
=
bufSize
;
queue
->
avail
=
bufSize
;
queue
->
items
=
0
;
taosThreadMutexUnlock
(
&
queue
->
mutex
);
}
return
queue
;
...
...
source/dnode/mgmt/node_mgmt/src/dmTransport.c
浏览文件 @
172a7c9a
...
...
@@ -301,7 +301,7 @@ int32_t dmInitServer(SDnode *pDnode) {
SDnodeTrans
*
pTrans
=
&
pDnode
->
trans
;
SRpcInit
rpcInit
=
{
0
};
strncpy
(
rpcInit
.
localFqdn
,
tsLocalFqdn
,
TSDB_FQDN_LEN
);
t
strncpy
(
rpcInit
.
localFqdn
,
tsLocalFqdn
,
TSDB_FQDN_LEN
);
rpcInit
.
localPort
=
tsServerPort
;
rpcInit
.
label
=
"DND-S"
;
rpcInit
.
numOfThreads
=
tsNumOfRpcThreads
;
...
...
source/dnode/mnode/impl/src/mndAcct.c
浏览文件 @
172a7c9a
...
...
@@ -83,6 +83,7 @@ static int32_t mndCreateDefaultAcct(SMnode *pMnode) {
STrans
*
pTrans
=
mndTransCreate
(
pMnode
,
TRN_POLICY_RETRY
,
TRN_CONFLICT_NOTHING
,
NULL
,
"create-acct"
);
if
(
pTrans
==
NULL
)
{
sdbFreeRaw
(
pRaw
);
mError
(
"acct:%s, failed to create since %s"
,
acctObj
.
acct
,
terrstr
());
return
-
1
;
}
...
...
source/dnode/mnode/impl/src/mndCluster.c
浏览文件 @
172a7c9a
...
...
@@ -315,7 +315,7 @@ static int32_t mndProcessUptimeTimer(SRpcMsg *pReq) {
return
0
;
}
mInfo
(
"update cluster uptime to %
"
PRId64
,
clusterObj
.
upTime
);
mInfo
(
"update cluster uptime to %
d"
,
clusterObj
.
upTime
);
STrans
*
pTrans
=
mndTransCreate
(
pMnode
,
TRN_POLICY_ROLLBACK
,
TRN_CONFLICT_NOTHING
,
pReq
,
"update-uptime"
);
if
(
pTrans
==
NULL
)
return
-
1
;
...
...
source/dnode/mnode/impl/src/mndSync.c
浏览文件 @
172a7c9a
...
...
@@ -68,7 +68,7 @@ void mndSyncCommitMsg(struct SSyncFSM *pFsm, const SRpcMsg *pMsg, SFsmCbMeta cbM
if
(
pMgmt
->
errCode
!=
0
)
{
mError
(
"trans:%d, failed to propose since %s, post sem"
,
transId
,
tstrerror
(
pMgmt
->
errCode
));
}
else
{
mInfo
(
"trans:%d, is proposed and post sem"
,
transId
,
tstrerror
(
pMgmt
->
errCode
)
);
mInfo
(
"trans:%d, is proposed and post sem"
,
transId
);
}
pMgmt
->
transId
=
0
;
taosWUnLockLatch
(
&
pMgmt
->
lock
);
...
...
@@ -113,13 +113,13 @@ void mndRestoreFinish(struct SSyncFSM *pFsm) {
}
}
void
mndReConfig
(
struct
SSyncFSM
*
pFsm
,
const
SRpcMsg
*
pMsg
,
SReConfigCbMeta
cbMeta
)
{
void
mndReConfig
(
struct
SSyncFSM
*
pFsm
,
const
SRpcMsg
*
pMsg
,
SReConfigCbMeta
*
cbMeta
)
{
SMnode
*
pMnode
=
pFsm
->
data
;
SSyncMgmt
*
pMgmt
=
&
pMnode
->
syncMgmt
;
pMgmt
->
errCode
=
cbMeta
.
code
;
pMgmt
->
errCode
=
cbMeta
->
code
;
mInfo
(
"trans:-1, sync reconfig is proposed, saved:%d code:0x%x, index:%"
PRId64
" term:%"
PRId64
,
pMgmt
->
transId
,
cbMeta
.
code
,
cbMeta
.
index
,
cbMeta
.
term
);
cbMeta
->
code
,
cbMeta
->
index
,
cbMeta
->
term
);
taosWLockLatch
(
&
pMgmt
->
lock
);
if
(
pMgmt
->
transId
==
-
1
)
{
...
...
@@ -127,7 +127,7 @@ void mndReConfig(struct SSyncFSM *pFsm, const SRpcMsg *pMsg, SReConfigCbMeta cbM
mError
(
"trans:-1, failed to propose sync reconfig since %s, post sem"
,
tstrerror
(
pMgmt
->
errCode
));
}
else
{
mInfo
(
"trans:-1, sync reconfig is proposed, saved:%d code:0x%x, index:%"
PRId64
" term:%"
PRId64
" post sem"
,
pMgmt
->
transId
,
cbMeta
.
code
,
cbMeta
.
index
,
cbMeta
.
term
);
pMgmt
->
transId
,
cbMeta
->
code
,
cbMeta
->
index
,
cbMeta
->
term
);
}
pMgmt
->
transId
=
0
;
tsem_post
(
&
pMgmt
->
syncSem
);
...
...
@@ -271,6 +271,11 @@ void mndCleanupSync(SMnode *pMnode) {
int32_t
mndSyncPropose
(
SMnode
*
pMnode
,
SSdbRaw
*
pRaw
,
int32_t
transId
)
{
SSyncMgmt
*
pMgmt
=
&
pMnode
->
syncMgmt
;
SRpcMsg
req
=
{.
msgType
=
TDMT_MND_APPLY_MSG
,
.
contLen
=
sdbGetRawTotalSize
(
pRaw
)};
if
(
req
.
contLen
<=
0
)
{
terrno
=
TSDB_CODE_APP_ERROR
;
return
-
1
;
}
req
.
pCont
=
rpcMallocCont
(
req
.
contLen
);
if
(
req
.
pCont
==
NULL
)
return
-
1
;
memcpy
(
req
.
pCont
,
pRaw
,
req
.
contLen
);
...
...
@@ -278,7 +283,7 @@ int32_t mndSyncPropose(SMnode *pMnode, SSdbRaw *pRaw, int32_t transId) {
pMgmt
->
errCode
=
0
;
taosWLockLatch
(
&
pMgmt
->
lock
);
if
(
pMgmt
->
transId
!=
0
)
{
mError
(
"trans:%d, can't be proposed since trans:%
s
alrady waiting for confirm"
,
transId
,
pMgmt
->
transId
);
mError
(
"trans:%d, can't be proposed since trans:%
d
alrady waiting for confirm"
,
transId
,
pMgmt
->
transId
);
taosWUnLockLatch
(
&
pMgmt
->
lock
);
terrno
=
TSDB_CODE_APP_NOT_READY
;
return
-
1
;
...
...
source/dnode/mnode/impl/src/mndTopic.c
浏览文件 @
172a7c9a
...
...
@@ -776,7 +776,7 @@ static int32_t mndRetrieveTopic(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl
SName
n
;
int32_t
cols
=
0
;
char
topicName
[
TSDB_TOPIC_NAME_LEN
+
VARSTR_HEADER_SIZE
]
=
{
0
};
char
topicName
[
TSDB_TOPIC_NAME_LEN
+
VARSTR_HEADER_SIZE
+
5
]
=
{
0
};
strcpy
(
varDataVal
(
topicName
),
mndGetDbStr
(
pTopic
->
name
));
/*tNameFromString(&n, pTopic->name, T_NAME_ACCT | T_NAME_DB);*/
/*tNameGetDbName(&n, varDataVal(topicName));*/
...
...
source/dnode/mnode/impl/src/mndTrans.c
浏览文件 @
172a7c9a
...
...
@@ -427,7 +427,7 @@ static SSdbRow *mndTransActionDecode(SSdbRaw *pRaw) {
terrno
=
0
;
_OVER:
if
(
terrno
!=
0
)
{
if
(
terrno
!=
0
&&
pTrans
!=
NULL
)
{
mError
(
"trans:%d, failed to parse from raw:%p since %s"
,
pTrans
->
id
,
pRaw
,
terrstr
());
mndTransDropData
(
pTrans
);
taosMemoryFreeClear
(
pRow
);
...
...
@@ -629,6 +629,7 @@ STrans *mndTransCreate(SMnode *pMnode, ETrnPolicy policy, ETrnConflct conflict,
pTrans
->
pRpcArray
==
NULL
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
mError
(
"failed to create transaction since %s"
,
terrstr
());
mndTransDrop
(
pTrans
);
return
NULL
;
}
...
...
@@ -1428,6 +1429,7 @@ static bool mndTransPerfromFinishedStage(SMnode *pMnode, STrans *pTrans) {
SSdbRaw
*
pRaw
=
mndTransActionEncode
(
pTrans
);
if
(
pRaw
==
NULL
)
{
mError
(
"trans:%d, failed to encode while finish trans since %s"
,
pTrans
->
id
,
terrstr
());
return
false
;
}
sdbSetRawStatus
(
pRaw
,
SDB_STATUS_DROPPED
);
...
...
@@ -1617,7 +1619,7 @@ static int32_t mndRetrieveTrans(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl
colDataAppend
(
pColInfo
,
numOfRows
,
(
const
char
*
)
&
pTrans
->
lastExecTime
,
false
);
char
lastInfo
[
TSDB_TRANS_ERROR_LEN
+
VARSTR_HEADER_SIZE
]
=
{
0
};
char
detail
[
TSDB_TRANS_ERROR_LEN
]
=
{
0
};
char
detail
[
TSDB_TRANS_ERROR_LEN
+
1
]
=
{
0
};
int32_t
len
=
snprintf
(
detail
,
sizeof
(
detail
),
"action:%d code:0x%x(%s) "
,
pTrans
->
lastAction
,
pTrans
->
lastErrorNo
&
0xFFFF
,
tstrerror
(
pTrans
->
lastErrorNo
));
SEpSet
epset
=
pTrans
->
lastEpset
;
...
...
source/dnode/mnode/impl/src/mndUser.c
浏览文件 @
172a7c9a
...
...
@@ -83,6 +83,7 @@ static int32_t mndCreateDefaultUser(SMnode *pMnode, char *acct, char *user, char
STrans
*
pTrans
=
mndTransCreate
(
pMnode
,
TRN_POLICY_RETRY
,
TRN_CONFLICT_NOTHING
,
NULL
,
"create-user"
);
if
(
pTrans
==
NULL
)
{
sdbFreeRaw
(
pRaw
);
mError
(
"user:%s, failed to create since %s"
,
userObj
.
user
,
terrstr
());
return
-
1
;
}
...
...
source/dnode/mnode/impl/src/mndVgroup.c
浏览文件 @
172a7c9a
...
...
@@ -1250,7 +1250,7 @@ static int32_t mndRedistributeVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb,
mError
(
"db:%s, vgId:%d, no enough memory:%"
PRId64
" in dnode:%d avail:%"
PRId64
" used:%"
PRId64
,
pVgroup
->
dbName
,
pVgroup
->
vgId
,
vgMem
,
pNew1
->
id
,
pNew1
->
memAvail
,
pNew1
->
memUsed
);
terrno
=
TSDB_CODE_MND_NO_ENOUGH_MEM_IN_DNODE
;
return
-
1
;
goto
_OVER
;
}
else
{
pNew1
->
memUsed
+=
vgMem
;
}
...
...
@@ -1272,7 +1272,7 @@ static int32_t mndRedistributeVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb,
mError
(
"db:%s, vgId:%d, no enough memory:%"
PRId64
" in dnode:%d avail:%"
PRId64
" used:%"
PRId64
,
pVgroup
->
dbName
,
pVgroup
->
vgId
,
vgMem
,
pNew2
->
id
,
pNew2
->
memAvail
,
pNew2
->
memUsed
);
terrno
=
TSDB_CODE_MND_NO_ENOUGH_MEM_IN_DNODE
;
return
-
1
;
goto
_OVER
;
}
else
{
pNew2
->
memUsed
+=
vgMem
;
}
...
...
@@ -1293,7 +1293,7 @@ static int32_t mndRedistributeVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb,
mError
(
"db:%s, vgId:%d, no enough memory:%"
PRId64
" in dnode:%d avail:%"
PRId64
" used:%"
PRId64
,
pVgroup
->
dbName
,
pVgroup
->
vgId
,
vgMem
,
pNew3
->
id
,
pNew3
->
memAvail
,
pNew3
->
memUsed
);
terrno
=
TSDB_CODE_MND_NO_ENOUGH_MEM_IN_DNODE
;
return
-
1
;
goto
_OVER
;
}
else
{
pNew3
->
memUsed
+=
vgMem
;
}
...
...
@@ -1627,7 +1627,7 @@ static int32_t mndSplitVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, SVgObj
}
else
if
(
newVg1
.
replica
==
3
)
{
SVnodeGid
del1
=
{
0
};
if
(
mndRemoveVnodeFromVgroup
(
pMnode
,
&
newVg1
,
pArray
,
&
del1
)
!=
0
)
goto
_OVER
;
if
(
mndAddSetVnodeStandByAction
(
pMnode
,
pTrans
,
pDb
,
pVgroup
,
&
del1
,
true
)
!=
0
)
return
-
1
;
if
(
mndAddSetVnodeStandByAction
(
pMnode
,
pTrans
,
pDb
,
pVgroup
,
&
del1
,
true
)
!=
0
)
goto
_OVER
;
if
(
mndAddAlterVnodeAction
(
pMnode
,
pTrans
,
pDb
,
&
newVg1
,
TDMT_VND_ALTER_REPLICA
)
!=
0
)
goto
_OVER
;
if
(
mndAddDropVnodeAction
(
pMnode
,
pTrans
,
pDb
,
&
newVg1
,
&
del1
,
true
)
!=
0
)
goto
_OVER
;
if
(
mndAddAlterVnodeConfirmAction
(
pMnode
,
pTrans
,
pDb
,
&
newVg1
)
!=
0
)
goto
_OVER
;
...
...
source/dnode/vnode/src/vnd/vnodeSync.c
浏览文件 @
172a7c9a
...
...
@@ -496,16 +496,16 @@ static int32_t vnodeSyncGetSnapshot(SSyncFSM *pFsm, SSnapshot *pSnapshot) {
return
0
;
}
static
void
vnodeSyncReconfig
(
struct
SSyncFSM
*
pFsm
,
const
SRpcMsg
*
pMsg
,
SReConfigCbMeta
cbMeta
)
{
static
void
vnodeSyncReconfig
(
struct
SSyncFSM
*
pFsm
,
const
SRpcMsg
*
pMsg
,
SReConfigCbMeta
*
cbMeta
)
{
SVnode
*
pVnode
=
pFsm
->
data
;
SRpcMsg
rpcMsg
=
{.
msgType
=
pMsg
->
msgType
,
.
contLen
=
pMsg
->
contLen
};
syncGetAndDelRespRpc
(
pVnode
->
sync
,
cbMeta
.
newCfgSeqNum
,
&
rpcMsg
.
info
);
rpcMsg
.
info
.
conn
.
applyIndex
=
cbMeta
.
index
;
syncGetAndDelRespRpc
(
pVnode
->
sync
,
cbMeta
->
newCfgSeqNum
,
&
rpcMsg
.
info
);
rpcMsg
.
info
.
conn
.
applyIndex
=
cbMeta
->
index
;
const
STraceId
*
trace
=
(
STraceId
*
)
&
pMsg
->
info
.
traceId
;
vGTrace
(
"vgId:%d, alter vnode replica is confirmed, type:%s contLen:%d seq:%"
PRIu64
" handle:%p"
,
TD_VID
(
pVnode
),
TMSG_INFO
(
pMsg
->
msgType
),
pMsg
->
contLen
,
cbMeta
.
seqNum
,
rpcMsg
.
info
.
handle
);
TMSG_INFO
(
pMsg
->
msgType
),
pMsg
->
contLen
,
cbMeta
->
seqNum
,
rpcMsg
.
info
.
handle
);
if
(
rpcMsg
.
info
.
handle
!=
NULL
)
{
tmsgSendRsp
(
&
rpcMsg
);
}
...
...
source/libs/sync/src/syncMain.c
浏览文件 @
172a7c9a
...
...
@@ -2942,7 +2942,7 @@ static int32_t syncNodeConfigChangeFinish(SSyncNode* ths, SRpcMsg* pRpcMsg, SSyn
cbMeta
.
newCfgTerm
=
pFinish
->
newCfgTerm
;
cbMeta
.
newCfgSeqNum
=
pFinish
->
newCfgSeqNum
;
ths
->
pFsm
->
FpReConfigCb
(
ths
->
pFsm
,
pRpcMsg
,
cbMeta
);
ths
->
pFsm
->
FpReConfigCb
(
ths
->
pFsm
,
pRpcMsg
,
&
cbMeta
);
}
// clear changing
...
...
source/libs/sync/test/syncConfigChangeSnapshotTest.cpp
浏览文件 @
172a7c9a
...
...
@@ -149,9 +149,9 @@ int32_t SnapshotDoWrite(struct SSyncFSM* pFsm, void* pWriter, void* pBuf, int32_
void
RestoreFinishCb
(
struct
SSyncFSM
*
pFsm
)
{
sTrace
(
"==callback== ==RestoreFinishCb=="
);
}
void
ReConfigCb
(
struct
SSyncFSM
*
pFsm
,
const
SRpcMsg
*
pMsg
,
SReConfigCbMeta
cbMeta
)
{
void
ReConfigCb
(
struct
SSyncFSM
*
pFsm
,
const
SRpcMsg
*
pMsg
,
SReConfigCbMeta
*
cbMeta
)
{
sTrace
(
"==callback== ==ReConfigCb== flag:0x%lX, index:%"
PRId64
", code:%d, currentTerm:%"
PRIu64
", term:%"
PRIu64
,
cbMeta
.
flag
,
cbMeta
.
index
,
cbMeta
.
code
,
cbMeta
.
currentTerm
,
cbMeta
.
term
);
cbMeta
->
flag
,
cbMeta
->
index
,
cbMeta
->
code
,
cbMeta
->
currentTerm
,
cbMeta
->
term
);
}
SSyncFSM
*
createFsm
()
{
...
...
source/libs/sync/test/syncConfigChangeTest.cpp
浏览文件 @
172a7c9a
...
...
@@ -80,9 +80,9 @@ int32_t GetSnapshotCb(struct SSyncFSM* pFsm, SSnapshot* pSnapshot) {
void
RestoreFinishCb
(
struct
SSyncFSM
*
pFsm
)
{
sTrace
(
"==callback== ==RestoreFinishCb=="
);
}
void
ReConfigCb
(
struct
SSyncFSM
*
pFsm
,
const
SRpcMsg
*
pMsg
,
SReConfigCbMeta
cbMeta
)
{
void
ReConfigCb
(
struct
SSyncFSM
*
pFsm
,
const
SRpcMsg
*
pMsg
,
SReConfigCbMeta
*
cbMeta
)
{
sTrace
(
"==callback== ==ReConfigCb== flag:0x%lX, index:%"
PRId64
", code:%d, currentTerm:%"
PRIu64
", term:%"
PRIu64
,
cbMeta
.
flag
,
cbMeta
.
index
,
cbMeta
.
code
,
cbMeta
.
currentTerm
,
cbMeta
.
term
);
cbMeta
->
flag
,
cbMeta
->
index
,
cbMeta
->
code
,
cbMeta
->
currentTerm
,
cbMeta
->
term
);
}
SSyncFSM
*
createFsm
()
{
...
...
source/libs/sync/test/syncTestTool.cpp
浏览文件 @
172a7c9a
...
...
@@ -153,11 +153,11 @@ int32_t SnapshotDoWrite(struct SSyncFSM* pFsm, void* pWriter, void* pBuf, int32_
void
RestoreFinishCb
(
struct
SSyncFSM
*
pFsm
)
{
sTrace
(
"==callback== ==RestoreFinishCb== pFsm:%p"
,
pFsm
);
}
void
ReConfigCb
(
struct
SSyncFSM
*
pFsm
,
const
SRpcMsg
*
pMsg
,
SReConfigCbMeta
cbMeta
)
{
void
ReConfigCb
(
struct
SSyncFSM
*
pFsm
,
const
SRpcMsg
*
pMsg
,
SReConfigCbMeta
*
cbMeta
)
{
char
*
s
=
syncCfg2Str
(
&
(
cbMeta
.
newCfg
));
sTrace
(
"==callback== ==ReConfigCb== flag:0x%lX, index:%"
PRId64
", code:%d, currentTerm:%"
PRIu64
", term:%"
PRIu64
", newCfg:%s"
,
cbMeta
.
flag
,
cbMeta
.
index
,
cbMeta
.
code
,
cbMeta
.
currentTerm
,
cbMeta
.
term
,
s
);
cbMeta
->
flag
,
cbMeta
->
index
,
cbMeta
->
code
,
cbMeta
->
currentTerm
,
cbMeta
->
term
,
s
);
taosMemoryFree
(
s
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录