Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
873ad883
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看板
提交
873ad883
编写于
5月 22, 2023
作者:
B
Benguang Zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enh: add prepareActions in STrans
上级
f8841046
变更
5
展开全部
显示空白变更内容
内联
并排
Showing
5 changed file
with
170 addition
and
216 deletion
+170
-216
source/dnode/mnode/impl/inc/mndDef.h
source/dnode/mnode/impl/inc/mndDef.h
+1
-0
source/dnode/mnode/impl/inc/mndTrans.h
source/dnode/mnode/impl/inc/mndTrans.h
+3
-1
source/dnode/mnode/impl/src/mndSync.c
source/dnode/mnode/impl/src/mndSync.c
+1
-1
source/dnode/mnode/impl/src/mndTrans.c
source/dnode/mnode/impl/src/mndTrans.c
+162
-213
source/dnode/mnode/impl/src/mndVgroup.c
source/dnode/mnode/impl/src/mndVgroup.c
+3
-1
未找到文件。
source/dnode/mnode/impl/inc/mndDef.h
浏览文件 @
873ad883
...
@@ -157,6 +157,7 @@ typedef struct {
...
@@ -157,6 +157,7 @@ typedef struct {
void
*
rpcRsp
;
void
*
rpcRsp
;
int32_t
rpcRspLen
;
int32_t
rpcRspLen
;
int32_t
redoActionPos
;
int32_t
redoActionPos
;
SArray
*
prepareActions
;
SArray
*
redoActions
;
SArray
*
redoActions
;
SArray
*
undoActions
;
SArray
*
undoActions
;
SArray
*
commitActions
;
SArray
*
commitActions
;
...
...
source/dnode/mnode/impl/inc/mndTrans.h
浏览文件 @
873ad883
...
@@ -70,6 +70,7 @@ int32_t mndTransAppendRedolog(STrans *pTrans, SSdbRaw *pRaw);
...
@@ -70,6 +70,7 @@ int32_t mndTransAppendRedolog(STrans *pTrans, SSdbRaw *pRaw);
int32_t
mndTransAppendUndolog
(
STrans
*
pTrans
,
SSdbRaw
*
pRaw
);
int32_t
mndTransAppendUndolog
(
STrans
*
pTrans
,
SSdbRaw
*
pRaw
);
int32_t
mndTransAppendCommitlog
(
STrans
*
pTrans
,
SSdbRaw
*
pRaw
);
int32_t
mndTransAppendCommitlog
(
STrans
*
pTrans
,
SSdbRaw
*
pRaw
);
int32_t
mndTransAppendNullLog
(
STrans
*
pTrans
);
int32_t
mndTransAppendNullLog
(
STrans
*
pTrans
);
int32_t
mndTransAppendPrepareAction
(
STrans
*
pTrans
,
STransAction
*
pRaw
);
int32_t
mndTransAppendRedoAction
(
STrans
*
pTrans
,
STransAction
*
pAction
);
int32_t
mndTransAppendRedoAction
(
STrans
*
pTrans
,
STransAction
*
pAction
);
int32_t
mndTransAppendUndoAction
(
STrans
*
pTrans
,
STransAction
*
pAction
);
int32_t
mndTransAppendUndoAction
(
STrans
*
pTrans
,
STransAction
*
pAction
);
void
mndTransSetRpcRsp
(
STrans
*
pTrans
,
void
*
pCont
,
int32_t
contLen
);
void
mndTransSetRpcRsp
(
STrans
*
pTrans
,
void
*
pCont
,
int32_t
contLen
);
...
@@ -86,7 +87,8 @@ int32_t mndTransPrepare(SMnode *pMnode, STrans *pTrans);
...
@@ -86,7 +87,8 @@ int32_t mndTransPrepare(SMnode *pMnode, STrans *pTrans);
int32_t
mndTransProcessRsp
(
SRpcMsg
*
pRsp
);
int32_t
mndTransProcessRsp
(
SRpcMsg
*
pRsp
);
void
mndTransPullup
(
SMnode
*
pMnode
);
void
mndTransPullup
(
SMnode
*
pMnode
);
int32_t
mndKillTrans
(
SMnode
*
pMnode
,
STrans
*
pTrans
);
int32_t
mndKillTrans
(
SMnode
*
pMnode
,
STrans
*
pTrans
);
void
mndTransExecute
(
SMnode
*
pMnode
,
STrans
*
pTrans
,
bool
isLeader
);
void
mndTransExecute
(
SMnode
*
pMnode
,
STrans
*
pTrans
);
void
mndTransRefresh
(
SMnode
*
pMnode
,
STrans
*
pTrans
);
int32_t
mndSetRpcInfoForDbTrans
(
SMnode
*
pMnode
,
SRpcMsg
*
pMsg
,
EOperType
oper
,
const
char
*
dbname
);
int32_t
mndSetRpcInfoForDbTrans
(
SMnode
*
pMnode
,
SRpcMsg
*
pMsg
,
EOperType
oper
,
const
char
*
dbname
);
#ifdef __cplusplus
#ifdef __cplusplus
...
...
source/dnode/mnode/impl/src/mndSync.c
浏览文件 @
873ad883
...
@@ -116,7 +116,7 @@ int32_t mndProcessWriteMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const SFsmCbMeta
...
@@ -116,7 +116,7 @@ int32_t mndProcessWriteMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const SFsmCbMeta
if
(
pTrans
!=
NULL
)
{
if
(
pTrans
!=
NULL
)
{
mInfo
(
"trans:%d, execute in mnode which not leader or sync timeout, createTime:%"
PRId64
" saved trans:%d"
,
mInfo
(
"trans:%d, execute in mnode which not leader or sync timeout, createTime:%"
PRId64
" saved trans:%d"
,
transId
,
pTrans
->
createdTime
,
pMgmt
->
transId
);
transId
,
pTrans
->
createdTime
,
pMgmt
->
transId
);
mndTrans
Execute
(
pMnode
,
pTrans
,
false
);
mndTrans
Refresh
(
pMnode
,
pTrans
);
mndReleaseTrans
(
pMnode
,
pTrans
);
mndReleaseTrans
(
pMnode
,
pTrans
);
}
else
{
}
else
{
mError
(
"trans:%d, not found while execute in mnode since %s"
,
transId
,
terrstr
());
mError
(
"trans:%d, not found while execute in mnode since %s"
,
transId
,
terrstr
());
...
...
source/dnode/mnode/impl/src/mndTrans.c
浏览文件 @
873ad883
此差异已折叠。
点击以展开。
source/dnode/mnode/impl/src/mndVgroup.c
浏览文件 @
873ad883
...
@@ -2255,11 +2255,13 @@ int32_t mndSplitVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, SVgObj *pVgro
...
@@ -2255,11 +2255,13 @@ int32_t mndSplitVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, SVgObj *pVgro
SDbObj
dbObj
=
{
0
};
SDbObj
dbObj
=
{
0
};
SArray
*
pArray
=
mndBuildDnodesArray
(
pMnode
,
0
);
SArray
*
pArray
=
mndBuildDnodesArray
(
pMnode
,
0
);
pTrans
=
mndTransCreate
(
pMnode
,
TRN_POLICY_RETRY
,
TRN_CONFLICT_
GLOBAL
,
pReq
,
"split-vgroup"
);
pTrans
=
mndTransCreate
(
pMnode
,
TRN_POLICY_RETRY
,
TRN_CONFLICT_
DB
,
pReq
,
"split-vgroup"
);
if
(
pTrans
==
NULL
)
goto
_OVER
;
if
(
pTrans
==
NULL
)
goto
_OVER
;
mndTransSetSerial
(
pTrans
);
mndTransSetSerial
(
pTrans
);
mInfo
(
"trans:%d, used to split vgroup, vgId:%d"
,
pTrans
->
id
,
pVgroup
->
vgId
);
mInfo
(
"trans:%d, used to split vgroup, vgId:%d"
,
pTrans
->
id
,
pVgroup
->
vgId
);
mndTransSetDbName
(
pTrans
,
pDb
->
name
,
NULL
);
SVgObj
newVg1
=
{
0
};
SVgObj
newVg1
=
{
0
};
memcpy
(
&
newVg1
,
pVgroup
,
sizeof
(
SVgObj
));
memcpy
(
&
newVg1
,
pVgroup
,
sizeof
(
SVgObj
));
mInfo
(
"vgId:%d, vgroup info before split, replica:%d hashBegin:%u hashEnd:%u"
,
newVg1
.
vgId
,
newVg1
.
replica
,
mInfo
(
"vgId:%d, vgroup info before split, replica:%d hashBegin:%u hashEnd:%u"
,
newVg1
.
vgId
,
newVg1
.
replica
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录