Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
be06f24c
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看板
提交
be06f24c
编写于
12月 25, 2021
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
minor changes
上级
406a3504
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
8 deletion
+9
-8
source/dnode/mgmt/impl/src/dndVnodes.c
source/dnode/mgmt/impl/src/dndVnodes.c
+2
-2
source/dnode/mnode/impl/inc/mndDef.h
source/dnode/mnode/impl/inc/mndDef.h
+1
-0
source/dnode/mnode/impl/src/mndStb.c
source/dnode/mnode/impl/src/mndStb.c
+1
-1
source/dnode/mnode/impl/src/mndTrans.c
source/dnode/mnode/impl/src/mndTrans.c
+5
-5
未找到文件。
source/dnode/mgmt/impl/src/dndVnodes.c
浏览文件 @
be06f24c
...
...
@@ -822,12 +822,12 @@ static void dndProcessVnodeWriteQueue(SVnodeObj *pVnode, taos_qall qall, int32_t
assert
(
ptr
!=
NULL
);
}
vnodeProcessWMsgs
(
pVnode
->
pImpl
,
pArray
);
//
vnodeProcessWMsgs(pVnode->pImpl, pArray);
for
(
size_t
i
=
0
;
i
<
numOfMsgs
;
i
++
)
{
SRpcMsg
*
pRsp
=
NULL
;
SRpcMsg
*
pMsg
=
*
(
SRpcMsg
**
)
taosArrayGet
(
pArray
,
i
);
int32_t
code
=
vnodeApplyWMsg
(
pVnode
->
pImpl
,
pMsg
,
&
pRsp
);
int32_t
code
=
0
;
//
vnodeApplyWMsg(pVnode->pImpl, pMsg, &pRsp);
if
(
pRsp
!=
NULL
)
{
pRsp
->
ahandle
=
pMsg
->
ahandle
;
rpcSendResponse
(
pRsp
);
...
...
source/dnode/mnode/impl/inc/mndDef.h
浏览文件 @
be06f24c
...
...
@@ -95,6 +95,7 @@ typedef struct {
int32_t
id
;
ETrnStage
stage
;
ETrnPolicy
policy
;
int32_t
retryTimes
;
void
*
rpcHandle
;
void
*
rpcAHandle
;
SArray
*
redoLogs
;
...
...
source/dnode/mnode/impl/src/mndStb.c
浏览文件 @
be06f24c
...
...
@@ -374,7 +374,7 @@ static int32_t mndSetCreateStbRedoActions(SMnode *pMnode, STrans *pTrans, SDbObj
STransAction
action
=
{
0
};
action
.
epSet
=
mndGetVgroupEpset
(
pMnode
,
pVgroup
);
action
.
pCont
=
pMsg
;
action
.
contLen
=
htonl
(
contLen
)
;
action
.
contLen
=
contLen
;
action
.
msgType
=
TDMT_VND_CREATE_STB
;
if
(
mndTransAppendRedoAction
(
pTrans
,
&
action
)
!=
0
)
{
free
(
pMsg
);
...
...
source/dnode/mnode/impl/src/mndTrans.c
浏览文件 @
be06f24c
...
...
@@ -39,7 +39,7 @@ static int32_t mndTransExecuteUndoLogs(SMnode *pMnode, STrans *pTrans);
static
int32_t
mndTransExecuteCommitLogs
(
SMnode
*
pMnode
,
STrans
*
pTrans
);
static
int32_t
mndTransExecuteRedoActions
(
SMnode
*
pMnode
,
STrans
*
pTrans
);
static
int32_t
mndTransExecuteUndoActions
(
SMnode
*
pMnode
,
STrans
*
pTrans
);
static
int32_t
mndTransPerformPrepareStage
(
SMnode
*
pMnode
,
STrans
*
pTrans
);
static
void
mndTransPerformPrepareStage
(
SMnode
*
pMnode
,
STrans
*
pTrans
);
static
int32_t
mndTransPerformExecuteStage
(
SMnode
*
pMnode
,
STrans
*
pTrans
);
static
int32_t
mndTransPerformCommitStage
(
SMnode
*
pMnode
,
STrans
*
pTrans
);
static
int32_t
mndTransPerformRollbackStage
(
SMnode
*
pMnode
,
STrans
*
pTrans
);
...
...
@@ -714,7 +714,7 @@ static int32_t mndTransExecuteUndoActions(SMnode *pMnode, STrans *pTrans) {
return
mndTransExecuteActions
(
pMnode
,
pTrans
,
pTrans
->
undoActions
);
}
static
int32_t
mndTransPerformPrepareStage
(
SMnode
*
pMnode
,
STrans
*
pTrans
)
{
static
void
mndTransPerformPrepareStage
(
SMnode
*
pMnode
,
STrans
*
pTrans
)
{
int32_t
code
=
mndTransExecuteRedoLogs
(
pMnode
,
pTrans
);
if
(
code
==
0
)
{
...
...
@@ -724,8 +724,6 @@ static int32_t mndTransPerformPrepareStage(SMnode *pMnode, STrans *pTrans) {
pTrans
->
stage
=
TRN_STAGE_ROLLBACK
;
mError
(
"trans:%d, stage from prepare to rollback since %s"
,
pTrans
->
id
,
terrstr
());
}
return
0
;
}
static
int32_t
mndTransPerformExecuteStage
(
SMnode
*
pMnode
,
STrans
*
pTrans
)
{
...
...
@@ -742,6 +740,7 @@ static int32_t mndTransPerformExecuteStage(SMnode *pMnode, STrans *pTrans) {
mError
(
"trans:%d, stage from execute to rollback since %s"
,
pTrans
->
id
,
terrstr
());
}
else
{
pTrans
->
stage
=
TRN_STAGE_EXECUTE
;
pTrans
->
retryTimes
++
;
mError
(
"trans:%d, stage keep on execute since %s"
,
pTrans
->
id
,
terrstr
());
}
}
...
...
@@ -762,6 +761,7 @@ static int32_t mndTransPerformRollbackStage(SMnode *pMnode, STrans *pTrans) {
mDebug
(
"trans:%d, rollbacked"
,
pTrans
->
id
);
}
else
{
pTrans
->
stage
=
TRN_STAGE_ROLLBACK
;
pTrans
->
retryTimes
++
;
mError
(
"trans:%d, stage keep on rollback since %s"
,
pTrans
->
id
,
terrstr
());
}
...
...
@@ -774,7 +774,7 @@ static void mndTransExecute(SMnode *pMnode, STrans *pTrans) {
while
(
code
==
0
)
{
switch
(
pTrans
->
stage
)
{
case
TRN_STAGE_PREPARE
:
code
=
mndTransPerformPrepareStage
(
pMnode
,
pTrans
);
mndTransPerformPrepareStage
(
pMnode
,
pTrans
);
break
;
case
TRN_STAGE_EXECUTE
:
code
=
mndTransPerformExecuteStage
(
pMnode
,
pTrans
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录