Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
5ba41111
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看板
提交
5ba41111
编写于
9月 15, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: add some logs.
上级
18924f9a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
11 deletion
+11
-11
source/dnode/vnode/src/inc/tsdb.h
source/dnode/vnode/src/inc/tsdb.h
+2
-2
source/dnode/vnode/src/tsdb/tsdbCache.c
source/dnode/vnode/src/tsdb/tsdbCache.c
+2
-2
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+7
-7
未找到文件。
source/dnode/vnode/src/inc/tsdb.h
浏览文件 @
5ba41111
...
...
@@ -299,8 +299,8 @@ int32_t tsdbDelFReaderClose(SDelFReader **ppReader);
int32_t
tsdbReadDelData
(
SDelFReader
*
pReader
,
SDelIdx
*
pDelIdx
,
SArray
*
aDelData
);
int32_t
tsdbReadDelIdx
(
SDelFReader
*
pReader
,
SArray
*
aDelIdx
);
// tsdbRead.c ==============================================================================================
int32_t
tsdbTakeReadSnap
(
STsdb
*
pTsdb
,
STsdbReadSnap
**
ppSnap
);
void
tsdbUntakeReadSnap
(
STsdb
*
pTsdb
,
STsdbReadSnap
*
pSnap
);
int32_t
tsdbTakeReadSnap
(
STsdb
*
pTsdb
,
STsdbReadSnap
**
ppSnap
,
const
char
*
id
);
void
tsdbUntakeReadSnap
(
STsdb
*
pTsdb
,
STsdbReadSnap
*
pSnap
,
const
char
*
id
);
// tsdbMerge.c ==============================================================================================
int32_t
tsdbMerge
(
STsdb
*
pTsdb
);
...
...
source/dnode/vnode/src/tsdb/tsdbCache.c
浏览文件 @
5ba41111
...
...
@@ -847,7 +847,7 @@ static int32_t nextRowIterOpen(CacheNextRowIter *pIter, tb_uid_t uid, STsdb *pTs
tb_uid_t
suid
=
getTableSuidByUid
(
uid
,
pTsdb
);
tsdbTakeReadSnap
(
pTsdb
,
&
pIter
->
pReadSnap
);
tsdbTakeReadSnap
(
pTsdb
,
&
pIter
->
pReadSnap
,
NULL
);
STbData
*
pMem
=
NULL
;
if
(
pIter
->
pReadSnap
->
pMem
)
{
...
...
@@ -941,7 +941,7 @@ static int32_t nextRowIterClose(CacheNextRowIter *pIter) {
taosArrayDestroy
(
pIter
->
pSkyline
);
}
tsdbUntakeReadSnap
(
pIter
->
pTsdb
,
pIter
->
pReadSnap
);
tsdbUntakeReadSnap
(
pIter
->
pTsdb
,
pIter
->
pReadSnap
,
NULL
);
_err:
return
code
;
...
...
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
5ba41111
...
...
@@ -3360,7 +3360,7 @@ int32_t tsdbReaderOpen(SVnode* pVnode, SQueryTableDataCond* pCond, SArray* pTabl
goto
_err
;
}
code
=
tsdbTakeReadSnap
(
pReader
->
pTsdb
,
&
pReader
->
pReadSnap
);
code
=
tsdbTakeReadSnap
(
pReader
->
pTsdb
,
&
pReader
->
pReadSnap
,
pReader
->
idStr
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
goto
_err
;
}
...
...
@@ -3384,7 +3384,7 @@ int32_t tsdbReaderOpen(SVnode* pVnode, SQueryTableDataCond* pCond, SArray* pTabl
STsdbReader
*
pPrevReader
=
pReader
->
innerReader
[
0
];
SDataBlockIter
*
pBlockIter
=
&
pPrevReader
->
status
.
blockIter
;
code
=
tsdbTakeReadSnap
(
pPrevReader
->
pTsdb
,
&
pPrevReader
->
pReadSnap
);
code
=
tsdbTakeReadSnap
(
pPrevReader
->
pTsdb
,
&
pPrevReader
->
pReadSnap
,
pReader
->
idStr
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
goto
_err
;
}
...
...
@@ -3441,7 +3441,7 @@ void tsdbReaderClose(STsdbReader* pReader) {
tsdbDataFReaderClose
(
&
pReader
->
pFileReader
);
}
tsdbUntakeReadSnap
(
pReader
->
pTsdb
,
pReader
->
pReadSnap
);
tsdbUntakeReadSnap
(
pReader
->
pTsdb
,
pReader
->
pReadSnap
,
pReader
->
idStr
);
taosMemoryFree
(
pReader
->
status
.
uidCheckInfo
.
tableUidList
);
SIOCostSummary
*
pCost
=
&
pReader
->
cost
;
...
...
@@ -3863,7 +3863,7 @@ int32_t tsdbGetTableSchema(SVnode* pVnode, int64_t uid, STSchema** pSchema, int6
return
TSDB_CODE_SUCCESS
;
}
int32_t
tsdbTakeReadSnap
(
STsdb
*
pTsdb
,
STsdbReadSnap
**
ppSnap
)
{
int32_t
tsdbTakeReadSnap
(
STsdb
*
pTsdb
,
STsdbReadSnap
**
ppSnap
,
const
char
*
idStr
)
{
int32_t
code
=
0
;
// alloc
...
...
@@ -3906,12 +3906,12 @@ int32_t tsdbTakeReadSnap(STsdb* pTsdb, STsdbReadSnap** ppSnap) {
goto
_exit
;
}
tsdbTrace
(
"vgId:%d, take read snapshot
"
,
TD_VID
(
pTsdb
->
pVnode
)
);
tsdbTrace
(
"vgId:%d, take read snapshot
, %s"
,
TD_VID
(
pTsdb
->
pVnode
),
idStr
);
_exit:
return
code
;
}
void
tsdbUntakeReadSnap
(
STsdb
*
pTsdb
,
STsdbReadSnap
*
pSnap
)
{
void
tsdbUntakeReadSnap
(
STsdb
*
pTsdb
,
STsdbReadSnap
*
pSnap
,
const
char
*
idStr
)
{
if
(
pSnap
)
{
if
(
pSnap
->
pMem
)
{
tsdbUnrefMemTable
(
pSnap
->
pMem
);
...
...
@@ -3925,5 +3925,5 @@ void tsdbUntakeReadSnap(STsdb* pTsdb, STsdbReadSnap* pSnap) {
taosMemoryFree
(
pSnap
);
}
tsdbTrace
(
"vgId:%d, untake read snapshot
"
,
TD_VID
(
pTsdb
->
pVnode
)
);
tsdbTrace
(
"vgId:%d, untake read snapshot
, %s"
,
TD_VID
(
pTsdb
->
pVnode
),
idStr
);
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录