Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
44170b9b
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1193
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看板
提交
44170b9b
编写于
7月 14, 2023
作者:
Y
yihaoDeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix recover error
上级
17b7e3cc
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
18 addition
and
17 deletion
+18
-17
source/dnode/mnode/impl/src/mndStream.c
source/dnode/mnode/impl/src/mndStream.c
+2
-0
source/dnode/mnode/impl/src/mndTrans.c
source/dnode/mnode/impl/src/mndTrans.c
+16
-17
未找到文件。
source/dnode/mnode/impl/src/mndStream.c
浏览文件 @
44170b9b
...
@@ -1166,6 +1166,8 @@ static int32_t mndProcessStreamDoCheckpoint(SRpcMsg *pReq) {
...
@@ -1166,6 +1166,8 @@ static int32_t mndProcessStreamDoCheckpoint(SRpcMsg *pReq) {
mError
(
"failed to trigger checkpoint, reason: %s"
,
tstrerror
(
TSDB_CODE_OUT_OF_MEMORY
));
mError
(
"failed to trigger checkpoint, reason: %s"
,
tstrerror
(
TSDB_CODE_OUT_OF_MEMORY
));
return
-
1
;
return
-
1
;
}
}
mDebug
(
"start to trigger checkpoint"
);
mndTransSetDbName
(
pTrans
,
"checkpoint"
,
"checkpoint"
);
mndTransSetDbName
(
pTrans
,
"checkpoint"
,
"checkpoint"
);
if
(
mndTransCheckConflict
(
pMnode
,
pTrans
)
!=
0
)
{
if
(
mndTransCheckConflict
(
pMnode
,
pTrans
)
!=
0
)
{
mError
(
"failed to trigger checkpoint, checkpointId: %"
PRId64
", reason:%s"
,
checkpointId
,
mError
(
"failed to trigger checkpoint, checkpointId: %"
PRId64
", reason:%s"
,
checkpointId
,
...
...
source/dnode/mnode/impl/src/mndTrans.c
浏览文件 @
44170b9b
...
@@ -28,9 +28,9 @@
...
@@ -28,9 +28,9 @@
#define TRANS_ARRAY_SIZE 8
#define TRANS_ARRAY_SIZE 8
#define TRANS_RESERVE_SIZE 48
#define TRANS_RESERVE_SIZE 48
static
int32_t
mndTransActionInsert
(
SSdb
*
pSdb
,
STrans
*
pTrans
);
static
int32_t
mndTransActionInsert
(
SSdb
*
pSdb
,
STrans
*
pTrans
);
static
int32_t
mndTransActionUpdate
(
SSdb
*
pSdb
,
STrans
*
OldTrans
,
STrans
*
pOld
);
static
int32_t
mndTransActionUpdate
(
SSdb
*
pSdb
,
STrans
*
OldTrans
,
STrans
*
pOld
);
static
int32_t
mndTransDelete
(
SSdb
*
pSdb
,
STrans
*
pTrans
,
bool
callFunc
);
static
int32_t
mndTransDelete
(
SSdb
*
pSdb
,
STrans
*
pTrans
,
bool
callFunc
);
static
int32_t
mndTransAppendLog
(
SArray
*
pArray
,
SSdbRaw
*
pRaw
);
static
int32_t
mndTransAppendLog
(
SArray
*
pArray
,
SSdbRaw
*
pRaw
);
static
int32_t
mndTransAppendAction
(
SArray
*
pArray
,
STransAction
*
pAction
);
static
int32_t
mndTransAppendAction
(
SArray
*
pArray
,
STransAction
*
pAction
);
...
@@ -100,10 +100,9 @@ static int32_t mndTransGetActionsSize(SArray *pArray) {
...
@@ -100,10 +100,9 @@ static int32_t mndTransGetActionsSize(SArray *pArray) {
return
rawDataLen
;
return
rawDataLen
;
}
}
static
int32_t
mndTransEncodeAction
(
SSdbRaw
*
pRaw
,
int32_t
*
offset
,
SArray
*
pActions
,
int32_t
actionsNum
)
{
static
int32_t
mndTransEncodeAction
(
SSdbRaw
*
pRaw
,
int32_t
*
offset
,
SArray
*
pActions
,
int32_t
actionsNum
)
{
int32_t
dataPos
=
*
offset
;
int32_t
dataPos
=
*
offset
;
int8_t
unused
=
0
;
int8_t
unused
=
0
;
int32_t
ret
=
-
1
;
int32_t
ret
=
-
1
;
for
(
int32_t
i
=
0
;
i
<
actionsNum
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
actionsNum
;
++
i
)
{
...
@@ -266,16 +265,16 @@ _OVER:
...
@@ -266,16 +265,16 @@ _OVER:
SSdbRow
*
mndTransDecode
(
SSdbRaw
*
pRaw
)
{
SSdbRow
*
mndTransDecode
(
SSdbRaw
*
pRaw
)
{
terrno
=
TSDB_CODE_INVALID_MSG
;
terrno
=
TSDB_CODE_INVALID_MSG
;
SSdbRow
*
pRow
=
NULL
;
SSdbRow
*
pRow
=
NULL
;
STrans
*
pTrans
=
NULL
;
STrans
*
pTrans
=
NULL
;
char
*
pData
=
NULL
;
char
*
pData
=
NULL
;
int32_t
dataLen
=
0
;
int32_t
dataLen
=
0
;
int8_t
sver
=
0
;
int8_t
sver
=
0
;
int32_t
prepareActionNum
=
0
;
int32_t
prepareActionNum
=
0
;
int32_t
redoActionNum
=
0
;
int32_t
redoActionNum
=
0
;
int32_t
undoActionNum
=
0
;
int32_t
undoActionNum
=
0
;
int32_t
commitActionNum
=
0
;
int32_t
commitActionNum
=
0
;
int32_t
dataPos
=
0
;
int32_t
dataPos
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
...
@@ -577,7 +576,7 @@ STrans *mndTransCreate(SMnode *pMnode, ETrnPolicy policy, ETrnConflct conflict,
...
@@ -577,7 +576,7 @@ STrans *mndTransCreate(SMnode *pMnode, ETrnPolicy policy, ETrnConflct conflict,
pTrans
->
undoActions
=
taosArrayInit
(
TRANS_ARRAY_SIZE
,
sizeof
(
STransAction
));
pTrans
->
undoActions
=
taosArrayInit
(
TRANS_ARRAY_SIZE
,
sizeof
(
STransAction
));
pTrans
->
commitActions
=
taosArrayInit
(
TRANS_ARRAY_SIZE
,
sizeof
(
STransAction
));
pTrans
->
commitActions
=
taosArrayInit
(
TRANS_ARRAY_SIZE
,
sizeof
(
STransAction
));
pTrans
->
pRpcArray
=
taosArrayInit
(
1
,
sizeof
(
SRpcHandleInfo
));
pTrans
->
pRpcArray
=
taosArrayInit
(
1
,
sizeof
(
SRpcHandleInfo
));
pTrans
->
mTraceId
=
pReq
?
TRACE_GET_ROOTID
(
&
pReq
->
info
.
traceId
)
:
0
;
pTrans
->
mTraceId
=
pReq
?
TRACE_GET_ROOTID
(
&
pReq
->
info
.
traceId
)
:
tGenIdPI64
()
;
taosInitRWLatch
(
&
pTrans
->
lockRpcArray
);
taosInitRWLatch
(
&
pTrans
->
lockRpcArray
);
taosThreadMutexInit
(
&
pTrans
->
mutex
,
NULL
);
taosThreadMutexInit
(
&
pTrans
->
mutex
,
NULL
);
...
@@ -1327,7 +1326,7 @@ static int32_t mndTransExecuteRedoActionsSerial(SMnode *pMnode, STrans *pTrans)
...
@@ -1327,7 +1326,7 @@ static int32_t mndTransExecuteRedoActionsSerial(SMnode *pMnode, STrans *pTrans)
}
}
bool
mndTransPerformPrepareStage
(
SMnode
*
pMnode
,
STrans
*
pTrans
)
{
bool
mndTransPerformPrepareStage
(
SMnode
*
pMnode
,
STrans
*
pTrans
)
{
bool
continueExec
=
true
;
bool
continueExec
=
true
;
int32_t
code
=
0
;
int32_t
code
=
0
;
int32_t
numOfActions
=
taosArrayGetSize
(
pTrans
->
prepareActions
);
int32_t
numOfActions
=
taosArrayGetSize
(
pTrans
->
prepareActions
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录