Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
85a53ac1
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22017
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看板
提交
85a53ac1
编写于
12月 25, 2021
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '3.0' into feature/vnode
上级
e5b41267
6701bcca
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
6 deletion
+7
-6
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/mnode/impl/inc/mndDef.h
浏览文件 @
85a53ac1
...
...
@@ -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
浏览文件 @
85a53ac1
...
...
@@ -383,7 +383,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
浏览文件 @
85a53ac1
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录