Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
5024fc1e
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看板
提交
5024fc1e
编写于
1月 10, 2023
作者:
M
Minglei Jin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tsdb/suspend: fix table block scan info
上级
020b79a0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
24 addition
and
13 deletion
+24
-13
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+21
-10
source/dnode/vnode/src/vnd/vnodeSvr.c
source/dnode/vnode/src/vnd/vnodeSvr.c
+3
-3
未找到文件。
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
5024fc1e
...
...
@@ -4001,7 +4001,8 @@ int32_t tsdbReaderSuspend(STsdbReader* pReader) {
if
(
pStatus
->
loadFromFile
)
{
SFileDataBlockInfo
*
pBlockInfo
=
getCurrentBlockInfo
(
&
pReader
->
status
.
blockIter
);
if
(
pBlockInfo
!=
NULL
)
{
pBlockScanInfo
=
taosHashGet
(
pStatus
->
pTableMap
,
&
pBlockInfo
->
uid
,
sizeof
(
pBlockInfo
->
uid
));
pBlockScanInfo
=
*
(
STableBlockScanInfo
**
)
taosHashGet
(
pStatus
->
pTableMap
,
&
pBlockInfo
->
uid
,
sizeof
(
pBlockInfo
->
uid
));
if
(
pBlockScanInfo
==
NULL
)
{
code
=
TSDB_CODE_INVALID_PARA
;
tsdbError
(
"failed to locate the uid:%"
PRIu64
" in query table uid list, total tables:%d, %s"
,
pBlockInfo
->
uid
,
...
...
@@ -4015,20 +4016,28 @@ int32_t tsdbReaderSuspend(STsdbReader* pReader) {
tsdbDataFReaderClose
(
&
pReader
->
pFileReader
);
// resetDataBlockScanInfo excluding lastKey
STableBlockScanInfo
*
p
=
NULL
;
STableBlockScanInfo
*
*
p
=
NULL
;
while
((
p
=
taosHashIterate
(
pStatus
->
pTableMap
,
p
))
!=
NULL
)
{
p
->
iterInit
=
false
;
p
->
iiter
.
hasVal
=
false
;
if
(
p
->
iter
.
iter
!=
NULL
)
{
p
->
iter
.
iter
=
tsdbTbDataIterDestroy
(
p
->
iter
.
iter
);
STableBlockScanInfo
*
pInfo
=
*
(
STableBlockScanInfo
**
)
p
;
pInfo
->
iterInit
=
false
;
pInfo
->
iter
.
hasVal
=
false
;
pInfo
->
iiter
.
hasVal
=
false
;
if
(
pInfo
->
iter
.
iter
!=
NULL
)
{
pInfo
->
iter
.
iter
=
tsdbTbDataIterDestroy
(
pInfo
->
iter
.
iter
);
}
p
->
delSkyline
=
taosArrayDestroy
(
p
->
delSkyline
);
// p->lastKey = ts;
if
(
pInfo
->
iiter
.
iter
!=
NULL
)
{
pInfo
->
iiter
.
iter
=
tsdbTbDataIterDestroy
(
pInfo
->
iiter
.
iter
);
}
pInfo
->
delSkyline
=
taosArrayDestroy
(
pInfo
->
delSkyline
);
// pInfo->lastKey = ts;
}
}
else
{
pBlockScanInfo
=
*
pStatus
->
pTableIter
;
pBlockScanInfo
=
pStatus
->
pTableIter
==
NULL
?
NULL
:
*
pStatus
->
pTableIter
;
if
(
pBlockScanInfo
)
{
// save lastKey to restore memory iterator
STimeWindow
w
=
pReader
->
pResBlock
->
info
.
window
;
...
...
@@ -4053,10 +4062,12 @@ int32_t tsdbReaderSuspend(STsdbReader* pReader) {
}
tsdbUntakeReadSnap
(
pReader
,
pReader
->
pReadSnap
,
false
);
pReader
->
pReadSnap
=
NULL
;
pReader
->
suspended
=
true
;
tsdbDebug
(
"reader: %p suspended uid %"
PRIu64
" in this query %s"
,
pReader
,
pBlockScanInfo
->
uid
,
pReader
->
idStr
);
tsdbDebug
(
"reader: %p suspended uid %"
PRIu64
" in this query %s"
,
pReader
,
pBlockScanInfo
?
pBlockScanInfo
->
uid
:
0
,
pReader
->
idStr
);
return
code
;
_err:
...
...
source/dnode/vnode/src/vnd/vnodeSvr.c
浏览文件 @
5024fc1e
...
...
@@ -191,13 +191,13 @@ int32_t vnodeProcessWriteMsg(SVnode *pVnode, SRpcMsg *pMsg, int64_t version, SRp
void
*
pReq
;
int32_t
len
;
int32_t
ret
;
/*
if (!pVnode->inUse) {
terrno = TSDB_CODE_VND_NO_AVAIL_BUFPOOL;
vError("vgId:%d, not ready to write since %s", TD_VID(pVnode), terrstr());
return -1;
}
*/
if
(
version
<=
pVnode
->
state
.
applied
)
{
vError
(
"vgId:%d, duplicate write request. version: %"
PRId64
", applied: %"
PRId64
""
,
TD_VID
(
pVnode
),
version
,
pVnode
->
state
.
applied
);
...
...
@@ -1001,7 +1001,7 @@ static int32_t vnodeProcessSubmitReq(SVnode *pVnode, int64_t version, void *pReq
code
=
terrno
;
goto
_exit
;
}
pSubmitTbData
->
uid
=
pSubmitTbData
->
pCreateTbReq
->
uid
;
// update uid if table exist for using below
pSubmitTbData
->
uid
=
pSubmitTbData
->
pCreateTbReq
->
uid
;
// update uid if table exist for using below
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录