Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
27f3b021
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看板
提交
27f3b021
编写于
1月 29, 2023
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more code fix
上级
f6335a79
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
13 addition
and
11 deletion
+13
-11
source/dnode/vnode/src/tsdb/tsdbSnapshot.c
source/dnode/vnode/src/tsdb/tsdbSnapshot.c
+13
-11
未找到文件。
source/dnode/vnode/src/tsdb/tsdbSnapshot.c
浏览文件 @
27f3b021
...
@@ -925,6 +925,7 @@ int32_t tsdbSnapReaderClose(STsdbSnapReader** ppReader) {
...
@@ -925,6 +925,7 @@ int32_t tsdbSnapReaderClose(STsdbSnapReader** ppReader) {
int32_t
lino
=
0
;
int32_t
lino
=
0
;
STsdbSnapReader
*
pReader
=
*
ppReader
;
STsdbSnapReader
*
pReader
=
*
ppReader
;
STsdb
*
pTsdb
=
pReader
->
pTsdb
;
// tombstone
// tombstone
if
(
pReader
->
pTIter
)
{
if
(
pReader
->
pTIter
)
{
...
@@ -957,9 +958,9 @@ int32_t tsdbSnapReaderClose(STsdbSnapReader** ppReader) {
...
@@ -957,9 +958,9 @@ int32_t tsdbSnapReaderClose(STsdbSnapReader** ppReader) {
_exit:
_exit:
if
(
code
)
{
if
(
code
)
{
tsdbError
(
"vgId:%d %s failed at line %d since %s"
,
TD_VID
(
p
Reader
->
p
Tsdb
->
pVnode
),
__func__
,
lino
,
tstrerror
(
code
));
tsdbError
(
"vgId:%d %s failed at line %d since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
__func__
,
lino
,
tstrerror
(
code
));
}
else
{
}
else
{
tsdbDebug
(
"vgId:%d %s done"
,
TD_VID
(
p
Reader
->
p
Tsdb
->
pVnode
),
__func__
);
tsdbDebug
(
"vgId:%d %s done"
,
TD_VID
(
pTsdb
->
pVnode
),
__func__
);
}
}
*
ppReader
=
NULL
;
*
ppReader
=
NULL
;
return
code
;
return
code
;
...
@@ -1901,6 +1902,8 @@ _exit:
...
@@ -1901,6 +1902,8 @@ _exit:
int32_t
tsdbSnapWriterClose
(
STsdbSnapWriter
**
ppWriter
,
int8_t
rollback
)
{
int32_t
tsdbSnapWriterClose
(
STsdbSnapWriter
**
ppWriter
,
int8_t
rollback
)
{
int32_t
code
=
0
;
int32_t
code
=
0
;
int32_t
lino
=
0
;
STsdbSnapWriter
*
pWriter
=
*
ppWriter
;
STsdbSnapWriter
*
pWriter
=
*
ppWriter
;
STsdb
*
pTsdb
=
pWriter
->
pTsdb
;
STsdb
*
pTsdb
=
pWriter
->
pTsdb
;
...
@@ -1913,7 +1916,7 @@ int32_t tsdbSnapWriterClose(STsdbSnapWriter** ppWriter, int8_t rollback) {
...
@@ -1913,7 +1916,7 @@ int32_t tsdbSnapWriterClose(STsdbSnapWriter** ppWriter, int8_t rollback) {
code
=
tsdbFSCommit
(
pWriter
->
pTsdb
);
code
=
tsdbFSCommit
(
pWriter
->
pTsdb
);
if
(
code
)
{
if
(
code
)
{
taosThreadRwlockUnlock
(
&
pTsdb
->
rwLock
);
taosThreadRwlockUnlock
(
&
pTsdb
->
rwLock
);
goto
_err
;
TSDB_CHECK_CODE
(
code
,
lino
,
_exit
)
;
}
}
// unlock
// unlock
...
@@ -1936,16 +1939,15 @@ int32_t tsdbSnapWriterClose(STsdbSnapWriter** ppWriter, int8_t rollback) {
...
@@ -1936,16 +1939,15 @@ int32_t tsdbSnapWriterClose(STsdbSnapWriter** ppWriter, int8_t rollback) {
for
(
int32_t
iBuf
=
0
;
iBuf
<
sizeof
(
pWriter
->
aBuf
)
/
sizeof
(
uint8_t
*
);
iBuf
++
)
{
for
(
int32_t
iBuf
=
0
;
iBuf
<
sizeof
(
pWriter
->
aBuf
)
/
sizeof
(
uint8_t
*
);
iBuf
++
)
{
tFree
(
pWriter
->
aBuf
[
iBuf
]);
tFree
(
pWriter
->
aBuf
[
iBuf
]);
}
}
tsdbInfo
(
"vgId:%d, %s done"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
__func__
);
taosMemoryFree
(
pWriter
);
taosMemoryFree
(
pWriter
);
*
ppWriter
=
NULL
;
*
ppWriter
=
NULL
;
return
code
;
_err:
_exit:
tsdbError
(
"vgId:%d, vnode snapshot tsdb writer close for %s failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
if
(
code
)
{
pWriter
->
pTsdb
->
path
,
tstrerror
(
code
));
tsdbError
(
"vgId:%d %s failed at line %d since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
__func__
,
lino
,
tstrerror
(
code
));
taosMemoryFree
(
pWriter
);
}
else
{
*
ppWriter
=
NULL
;
tsdbInfo
(
"vgId:%d %s done"
,
TD_VID
(
pTsdb
->
pVnode
),
__func__
);
}
return
code
;
return
code
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录