Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
d782e229
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d782e229
编写于
7月 13, 2020
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
finish more code
上级
69199ae3
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
8 deletion
+8
-8
src/tsdb/src/tsdbRWHelper.c
src/tsdb/src/tsdbRWHelper.c
+8
-8
未找到文件。
src/tsdb/src/tsdbRWHelper.c
浏览文件 @
d782e229
...
...
@@ -810,16 +810,16 @@ static int tsdbInsertSuperBlock(SRWHelper *pHelper, SCompBlock *pCompBlock, int
if
(
tsize
>
0
)
{
ASSERT
(
sizeof
(
SCompInfo
)
+
sizeof
(
SCompBlock
)
*
(
blkIdx
+
1
)
<
tsizeof
(
pHelper
->
pCompInfo
));
ASSERT
(
sizeof
(
SCompInfo
)
+
sizeof
(
SCompBlock
)
*
(
blkIdx
+
1
)
+
tsize
<=
tsizeof
(
pHelper
->
pCompInfo
));
memmove
(
(
void
*
)((
char
*
)
pHelper
->
pCompInfo
+
sizeof
(
SCompInfo
)
+
sizeof
(
SCompBlock
)
*
(
blkIdx
+
1
)),
(
void
*
)((
char
*
)
pHelper
->
pCompInfo
+
sizeof
(
SCompInfo
)
+
sizeof
(
SCompBlock
)
*
blkIdx
),
tsize
);
memmove
(
POINTER_SHIFT
(
pHelper
->
pCompInfo
,
sizeof
(
SCompInfo
)
+
sizeof
(
SCompBlock
)
*
(
blkIdx
+
1
)),
POINTER_SHIFT
(
pHelper
->
pCompInfo
,
sizeof
(
SCompInfo
)
+
sizeof
(
SCompBlock
)
*
blkIdx
),
tsize
);
}
pHelper
->
pCompInfo
->
blocks
[
blkIdx
]
=
*
pCompBlock
;
pIdx
->
numOfBlocks
++
;
pIdx
->
len
+=
sizeof
(
SCompBlock
);
ASSERT
(
pIdx
->
len
<=
tsizeof
(
pHelper
->
pCompInfo
));
pIdx
->
maxKey
=
pHelper
->
pCompInfo
->
blocks
[
pIdx
->
numOfBlocks
-
1
].
keyLast
;
pIdx
->
hasLast
=
pHelper
->
pCompInfo
->
blocks
[
pIdx
->
numOfBlocks
-
1
].
last
;
pIdx
->
maxKey
=
blockAtIdx
(
pHelper
,
pIdx
->
numOfBlocks
-
1
)
->
keyLast
;
pIdx
->
hasLast
=
blockAtIdx
(
pHelper
,
pIdx
->
numOfBlocks
-
1
)
->
last
;
if
(
pIdx
->
numOfBlocks
>
1
)
{
ASSERT
(
pHelper
->
pCompInfo
->
blocks
[
0
].
keyLast
<
pHelper
->
pCompInfo
->
blocks
[
1
].
keyFirst
);
...
...
@@ -933,8 +933,8 @@ static int tsdbUpdateSuperBlock(SRWHelper *pHelper, SCompBlock *pCompBlock, int
if
(
pSCompBlock
->
numOfSubBlocks
>
1
)
{
size_t
tsize
=
pIdx
->
len
-
(
pSCompBlock
->
offset
+
pSCompBlock
->
len
);
if
(
tsize
>
0
)
{
memmove
(
(
void
*
)((
char
*
)(
pHelper
->
pCompInfo
)
+
pSCompBlock
->
offset
),
(
void
*
)((
char
*
)(
pHelper
->
pCompInfo
)
+
pSCompBlock
->
offset
+
pSCompBlock
->
len
),
tsize
);
memmove
(
POINTER_SHIFT
(
pHelper
->
pCompInfo
,
pSCompBlock
->
offset
),
POINTER_SHIFT
(
pHelper
->
pCompInfo
,
pSCompBlock
->
offset
+
pSCompBlock
->
len
),
tsize
);
}
for
(
int
i
=
blkIdx
+
1
;
i
<
pIdx
->
numOfBlocks
;
i
++
)
{
...
...
@@ -947,8 +947,8 @@ static int tsdbUpdateSuperBlock(SRWHelper *pHelper, SCompBlock *pCompBlock, int
*
pSCompBlock
=
*
pCompBlock
;
pIdx
->
maxKey
=
pHelper
->
pCompInfo
->
blocks
[
pIdx
->
numOfBlocks
-
1
].
keyLast
;
pIdx
->
hasLast
=
pHelper
->
pCompInfo
->
blocks
[
pIdx
->
numOfBlocks
-
1
].
last
;
pIdx
->
maxKey
=
blockAtIdx
(
pHelper
,
pIdx
->
numOfBlocks
-
1
)
->
keyLast
;
pIdx
->
hasLast
=
blockAtIdx
(
pHelper
,
pIdx
->
numOfBlocks
-
1
)
->
last
;
tsdbDebug
(
"vgId:%d tid:%d a super block is updated at index %d"
,
REPO_ID
(
pHelper
->
pRepo
),
pHelper
->
tableInfo
.
tid
,
blkIdx
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录