Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
21d97293
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
21d97293
编写于
7月 05, 2023
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more fix
上级
f35db3ba
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
2 deletion
+22
-2
source/dnode/vnode/src/tsdb/tsdbCommit2.c
source/dnode/vnode/src/tsdb/tsdbCommit2.c
+9
-0
source/dnode/vnode/src/tsdb/tsdbDataFileRW.c
source/dnode/vnode/src/tsdb/tsdbDataFileRW.c
+9
-0
source/dnode/vnode/src/tsdb/tsdbMerge.c
source/dnode/vnode/src/tsdb/tsdbMerge.c
+4
-2
未找到文件。
source/dnode/vnode/src/tsdb/tsdbCommit2.c
浏览文件 @
21d97293
...
...
@@ -108,6 +108,7 @@ static int32_t tsdbCommitCloseWriter(SCommitter2 *committer) {
static
int32_t
tsdbCommitTSData
(
SCommitter2
*
committer
)
{
int32_t
code
=
0
;
int32_t
lino
=
0
;
int64_t
numOfRow
=
0
;
SMetaInfo
info
;
committer
->
ctx
->
hasTSData
=
false
;
...
...
@@ -135,6 +136,7 @@ static int32_t tsdbCommitTSData(SCommitter2 *committer) {
}
committer
->
ctx
->
hasTSData
=
true
;
numOfRow
++
;
code
=
tsdbFSetWriteRow
(
committer
->
writer
,
row
);
TSDB_CHECK_CODE
(
code
,
lino
,
_exit
);
...
...
@@ -146,6 +148,8 @@ static int32_t tsdbCommitTSData(SCommitter2 *committer) {
_exit:
if
(
code
)
{
TSDB_ERROR_LOG
(
TD_VID
(
committer
->
tsdb
->
pVnode
),
lino
,
code
);
}
else
{
tsdbDebug
(
"vgId:%d fid:%d commit %"
PRId64
" rows"
,
TD_VID
(
committer
->
tsdb
->
pVnode
),
committer
->
ctx
->
fid
,
numOfRow
);
}
return
code
;
}
...
...
@@ -153,6 +157,7 @@ _exit:
static
int32_t
tsdbCommitTombData
(
SCommitter2
*
committer
)
{
int32_t
code
=
0
;
int32_t
lino
=
0
;
int64_t
numRecord
=
0
;
SMetaInfo
info
;
if
(
committer
->
ctx
->
fset
==
NULL
&&
!
committer
->
ctx
->
hasTSData
)
{
...
...
@@ -187,6 +192,7 @@ static int32_t tsdbCommitTombData(SCommitter2 *committer) {
record
->
skey
=
TMAX
(
record
->
skey
,
committer
->
ctx
->
minKey
);
record
->
ekey
=
TMIN
(
record
->
ekey
,
committer
->
ctx
->
maxKey
);
numRecord
++
;
code
=
tsdbFSetWriteTombRecord
(
committer
->
writer
,
record
);
TSDB_CHECK_CODE
(
code
,
lino
,
_exit
);
...
...
@@ -198,6 +204,9 @@ static int32_t tsdbCommitTombData(SCommitter2 *committer) {
_exit:
if
(
code
)
{
TSDB_ERROR_LOG
(
TD_VID
(
committer
->
tsdb
->
pVnode
),
lino
,
code
);
}
else
{
tsdbDebug
(
"vgId:%d fid:%d commit %"
PRId64
" tomb records"
,
TD_VID
(
committer
->
tsdb
->
pVnode
),
committer
->
ctx
->
fid
,
numRecord
);
}
return
code
;
}
...
...
source/dnode/vnode/src/tsdb/tsdbDataFileRW.c
浏览文件 @
21d97293
...
...
@@ -703,6 +703,15 @@ int32_t tsdbFileWriteBrinBlock(STsdbFD *fd, SBrinBlock *brinBlock, int8_t cmprAl
*
fileSize
+=
brinBlk
->
size
[
j
];
}
#if 0
SBrinRecord record;
for (int32_t i = 0; i < BRIN_BLOCK_SIZE(brinBlock); i++) {
tBrinBlockGet(brinBlock, i, &record);
tsdbInfo("write brin block, block num:%04d, idx:%04d suid:%ld, uid:%ld, offset:%ld, numRow:%d, count:%d",
TARRAY2_SIZE(brinBlkArray), i, record.suid, record.uid, record.blockOffset, record.numRow, record.count);
}
#endif
// append to brinBlkArray
code
=
TARRAY2_APPEND_PTR
(
brinBlkArray
,
brinBlk
);
if
(
code
)
return
code
;
...
...
source/dnode/vnode/src/tsdb/tsdbMerge.c
浏览文件 @
21d97293
...
...
@@ -107,6 +107,7 @@ static int32_t tsdbMergeFileSetBeginOpenReader(SMerger *merger) {
merger
->
ctx
->
toData
=
true
;
merger
->
ctx
->
level
=
0
;
// TODO: optimize merge strategy
for
(
int32_t
i
=
0
;;
++
i
)
{
if
(
i
>=
TARRAY2_SIZE
(
merger
->
ctx
->
fset
->
lvlArr
))
{
merger
->
ctx
->
lvl
=
NULL
;
...
...
@@ -150,6 +151,8 @@ static int32_t tsdbMergeFileSetBeginOpenReader(SMerger *merger) {
code
=
TARRAY2_APPEND
(
merger
->
sttReaderArr
,
reader
);
TSDB_CHECK_CODE
(
code
,
lino
,
_exit
);
numFile
++
;
}
}
...
...
@@ -354,10 +357,9 @@ static int32_t tsdbMergeFileSet(SMerger *merger, STFileSet *fset) {
}
// tomb
STombRecord
*
record
;
merger
->
ctx
->
tbid
->
suid
=
0
;
merger
->
ctx
->
tbid
->
uid
=
0
;
while
((
record
=
tsdbIterMergerGetTombRecord
(
merger
->
tombIterMerger
))
!=
NULL
)
{
for
(
STombRecord
*
record
;
(
record
=
tsdbIterMergerGetTombRecord
(
merger
->
tombIterMerger
))
!=
NULL
;
)
{
if
(
record
->
uid
!=
merger
->
ctx
->
tbid
->
uid
)
{
merger
->
ctx
->
tbid
->
uid
=
record
->
uid
;
merger
->
ctx
->
tbid
->
suid
=
record
->
suid
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录