Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
50f394de
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
50f394de
编写于
2月 16, 2023
作者:
X
Xiaoyu Wang
提交者:
GitHub
2月 16, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #20012 from taosdata/FIX/TS-2656-main
enh: refactor some asserts in walRead.c and doQueueScan.
上级
f8b59fc5
2a08e2a5
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
9 addition
and
16 deletion
+9
-16
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+9
-5
source/libs/wal/src/walRead.c
source/libs/wal/src/walRead.c
+0
-11
未找到文件。
source/libs/executor/src/scanoperator.c
浏览文件 @
50f394de
...
...
@@ -1573,7 +1573,7 @@ static SSDataBlock* doQueueScan(SOperatorInfo* pOperator) {
qError
(
"submit msg messed up when initing stream submit block %p"
,
pSubmit
);
pInfo
->
tqReader
->
pMsg
=
NULL
;
pTaskInfo
->
streamInfo
.
pReq
=
NULL
;
ASSERT
(
0
)
;
return
NULL
;
}
}
...
...
@@ -1628,11 +1628,14 @@ static SSDataBlock* doQueueScan(SOperatorInfo* pOperator) {
if
(
pTaskInfo
->
streamInfo
.
prepareStatus
.
type
==
TMQ_OFFSET__LOG
)
{
while
(
1
)
{
SFetchRet
ret
=
{
0
};
tqNextBlock
(
pInfo
->
tqReader
,
&
ret
);
if
(
tqNextBlock
(
pInfo
->
tqReader
,
&
ret
)
<
0
)
{
qError
(
"failed to get next log block since %s"
,
terrstr
());
return
NULL
;
}
if
(
ret
.
fetchType
==
FETCH_TYPE__DATA
)
{
blockDataCleanup
(
pInfo
->
pRes
);
if
(
setBlockIntoRes
(
pInfo
,
&
ret
.
data
,
true
)
<
0
)
{
ASSERT
(
0
)
;
return
NULL
;
}
if
(
pInfo
->
pRes
->
info
.
rows
>
0
)
{
pOperator
->
status
=
OP_EXEC_RECV
;
...
...
@@ -1640,7 +1643,8 @@ static SSDataBlock* doQueueScan(SOperatorInfo* pOperator) {
return
pInfo
->
pRes
;
}
}
else
if
(
ret
.
fetchType
==
FETCH_TYPE__META
)
{
ASSERT
(
0
);
qError
(
"unexpected ret.fetchType:%d"
,
ret
.
fetchType
);
return
NULL
;
// pTaskInfo->streamInfo.lastStatus = ret.offset;
// pTaskInfo->streamInfo.metaBlk = ret.meta;
// return NULL;
...
...
@@ -1667,7 +1671,7 @@ static SSDataBlock* doQueueScan(SOperatorInfo* pOperator) {
return NULL;
#endif
}
else
{
ASSERT
(
0
);
qError
(
"unexpected streamInfo prepare type: %d"
,
pTaskInfo
->
streamInfo
.
prepareStatus
.
type
);
return
NULL
;
}
}
...
...
source/libs/wal/src/walRead.c
浏览文件 @
50f394de
...
...
@@ -241,7 +241,6 @@ static int32_t walFetchHeadNew(SWalReader *pRead, int64_t fetchVer) {
if
(
pRead
->
curInvalid
||
pRead
->
curVersion
!=
fetchVer
)
{
if
(
walReadSeekVer
(
pRead
,
fetchVer
)
<
0
)
{
ASSERT
(
0
);
pRead
->
curVersion
=
fetchVer
;
pRead
->
curInvalid
=
1
;
return
-
1
;
...
...
@@ -262,7 +261,6 @@ static int32_t walFetchHeadNew(SWalReader *pRead, int64_t fetchVer) {
}
else
{
terrno
=
TSDB_CODE_WAL_FILE_CORRUPTED
;
}
ASSERT
(
0
);
pRead
->
curInvalid
=
1
;
return
-
1
;
}
...
...
@@ -299,7 +297,6 @@ static int32_t walFetchBodyNew(SWalReader *pRead) {
terrno
=
TSDB_CODE_WAL_FILE_CORRUPTED
;
}
pRead
->
curInvalid
=
1
;
ASSERT
(
0
);
return
-
1
;
}
...
...
@@ -308,7 +305,6 @@ static int32_t walFetchBodyNew(SWalReader *pRead) {
pRead
->
pHead
->
head
.
version
,
ver
);
pRead
->
curInvalid
=
1
;
terrno
=
TSDB_CODE_WAL_FILE_CORRUPTED
;
ASSERT
(
0
);
return
-
1
;
}
...
...
@@ -316,7 +312,6 @@ static int32_t walFetchBodyNew(SWalReader *pRead) {
wError
(
"vgId:%d, wal fetch body error:%"
PRId64
", since body checksum not passed"
,
pRead
->
pWal
->
cfg
.
vgId
,
ver
);
pRead
->
curInvalid
=
1
;
terrno
=
TSDB_CODE_WAL_FILE_CORRUPTED
;
ASSERT
(
0
);
return
-
1
;
}
...
...
@@ -335,7 +330,6 @@ static int32_t walSkipFetchBodyNew(SWalReader *pRead) {
if
(
code
<
0
)
{
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
pRead
->
curInvalid
=
1
;
ASSERT
(
0
);
return
-
1
;
}
...
...
@@ -384,7 +378,6 @@ int32_t walFetchHead(SWalReader *pRead, int64_t ver, SWalCkHead *pHead) {
}
else
{
terrno
=
TSDB_CODE_WAL_FILE_CORRUPTED
;
}
ASSERT
(
0
);
pRead
->
curInvalid
=
1
;
return
-
1
;
}
...
...
@@ -447,7 +440,6 @@ int32_t walFetchBody(SWalReader *pRead, SWalCkHead **ppHead) {
if
(
pReadHead
->
bodyLen
!=
taosReadFile
(
pRead
->
pLogFile
,
pReadHead
->
body
,
pReadHead
->
bodyLen
))
{
if
(
pReadHead
->
bodyLen
<
0
)
{
ASSERT
(
0
);
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
wError
(
"vgId:%d, wal fetch body error:%"
PRId64
", read request index:%"
PRId64
", since %s"
,
pRead
->
pWal
->
cfg
.
vgId
,
pReadHead
->
version
,
ver
,
tstrerror
(
terrno
));
...
...
@@ -457,12 +449,10 @@ int32_t walFetchBody(SWalReader *pRead, SWalCkHead **ppHead) {
terrno
=
TSDB_CODE_WAL_FILE_CORRUPTED
;
}
pRead
->
curInvalid
=
1
;
ASSERT
(
0
);
return
-
1
;
}
if
(
pReadHead
->
version
!=
ver
)
{
ASSERT
(
0
);
wError
(
"vgId:%d, wal fetch body error, index:%"
PRId64
", read request index:%"
PRId64
,
pRead
->
pWal
->
cfg
.
vgId
,
pReadHead
->
version
,
ver
);
pRead
->
curInvalid
=
1
;
...
...
@@ -471,7 +461,6 @@ int32_t walFetchBody(SWalReader *pRead, SWalCkHead **ppHead) {
}
if
(
walValidBodyCksum
(
*
ppHead
)
!=
0
)
{
ASSERT
(
0
);
wError
(
"vgId:%d, wal fetch body error, index:%"
PRId64
", since body checksum not passed"
,
pRead
->
pWal
->
cfg
.
vgId
,
ver
);
pRead
->
curInvalid
=
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录