Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b929041e
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看板
未验证
提交
b929041e
编写于
2月 14, 2023
作者:
X
Xiaoyu Wang
提交者:
GitHub
2月 14, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #19968 from taosdata/fix/TD-22393
fix(vnd): zero meta in vnode when closing
上级
451b3628
ea81fc0b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
10 addition
and
8 deletion
+10
-8
source/dnode/vnode/src/inc/vnodeInt.h
source/dnode/vnode/src/inc/vnodeInt.h
+1
-1
source/dnode/vnode/src/meta/metaOpen.c
source/dnode/vnode/src/meta/metaOpen.c
+4
-2
source/dnode/vnode/src/vnd/vnodeOpen.c
source/dnode/vnode/src/vnd/vnodeOpen.c
+2
-2
source/dnode/vnode/test/tsdbSmaTest.cpp
source/dnode/vnode/test/tsdbSmaTest.cpp
+3
-3
未找到文件。
source/dnode/vnode/src/inc/vnodeInt.h
浏览文件 @
b929041e
...
@@ -107,7 +107,7 @@ typedef struct STbUidStore STbUidStore;
...
@@ -107,7 +107,7 @@ typedef struct STbUidStore STbUidStore;
#define META_BEGIN_HEAP_NIL 2
#define META_BEGIN_HEAP_NIL 2
int
metaOpen
(
SVnode
*
pVnode
,
SMeta
**
ppMeta
,
int8_t
rollback
);
int
metaOpen
(
SVnode
*
pVnode
,
SMeta
**
ppMeta
,
int8_t
rollback
);
int
metaClose
(
SMeta
*
pMeta
);
int
metaClose
(
SMeta
*
*
pMeta
);
int
metaBegin
(
SMeta
*
pMeta
,
int8_t
fromSys
);
int
metaBegin
(
SMeta
*
pMeta
,
int8_t
fromSys
);
TXN
*
metaGetTxn
(
SMeta
*
pMeta
);
TXN
*
metaGetTxn
(
SMeta
*
pMeta
);
int
metaCommit
(
SMeta
*
pMeta
,
TXN
*
txn
);
int
metaCommit
(
SMeta
*
pMeta
,
TXN
*
txn
);
...
...
source/dnode/vnode/src/meta/metaOpen.c
浏览文件 @
b929041e
...
@@ -201,7 +201,8 @@ _err:
...
@@ -201,7 +201,8 @@ _err:
return
-
1
;
return
-
1
;
}
}
int
metaClose
(
SMeta
*
pMeta
)
{
int
metaClose
(
SMeta
**
ppMeta
)
{
SMeta
*
pMeta
=
*
ppMeta
;
if
(
pMeta
)
{
if
(
pMeta
)
{
if
(
pMeta
->
pEnv
)
metaAbort
(
pMeta
);
if
(
pMeta
->
pEnv
)
metaAbort
(
pMeta
);
if
(
pMeta
->
pCache
)
metaCacheClose
(
pMeta
);
if
(
pMeta
->
pCache
)
metaCacheClose
(
pMeta
);
...
@@ -221,7 +222,8 @@ int metaClose(SMeta *pMeta) {
...
@@ -221,7 +222,8 @@ int metaClose(SMeta *pMeta) {
if
(
pMeta
->
pTbDb
)
tdbTbClose
(
pMeta
->
pTbDb
);
if
(
pMeta
->
pTbDb
)
tdbTbClose
(
pMeta
->
pTbDb
);
if
(
pMeta
->
pEnv
)
tdbClose
(
pMeta
->
pEnv
);
if
(
pMeta
->
pEnv
)
tdbClose
(
pMeta
->
pEnv
);
metaDestroyLock
(
pMeta
);
metaDestroyLock
(
pMeta
);
taosMemoryFree
(
pMeta
);
taosMemoryFreeClear
(
*
ppMeta
);
}
}
return
0
;
return
0
;
...
...
source/dnode/vnode/src/vnd/vnodeOpen.c
浏览文件 @
b929041e
...
@@ -239,7 +239,7 @@ _err:
...
@@ -239,7 +239,7 @@ _err:
if
(
pVnode
->
pWal
)
walClose
(
pVnode
->
pWal
);
if
(
pVnode
->
pWal
)
walClose
(
pVnode
->
pWal
);
if
(
pVnode
->
pTsdb
)
tsdbClose
(
&
pVnode
->
pTsdb
);
if
(
pVnode
->
pTsdb
)
tsdbClose
(
&
pVnode
->
pTsdb
);
if
(
pVnode
->
pSma
)
smaClose
(
pVnode
->
pSma
);
if
(
pVnode
->
pSma
)
smaClose
(
pVnode
->
pSma
);
if
(
pVnode
->
pMeta
)
metaClose
(
pVnode
->
pMeta
);
if
(
pVnode
->
pMeta
)
metaClose
(
&
pVnode
->
pMeta
);
if
(
pVnode
->
pPool
)
vnodeCloseBufPool
(
pVnode
);
if
(
pVnode
->
pPool
)
vnodeCloseBufPool
(
pVnode
);
tsem_destroy
(
&
(
pVnode
->
canCommit
));
tsem_destroy
(
&
(
pVnode
->
canCommit
));
...
@@ -263,7 +263,7 @@ void vnodeClose(SVnode *pVnode) {
...
@@ -263,7 +263,7 @@ void vnodeClose(SVnode *pVnode) {
tqClose
(
pVnode
->
pTq
);
tqClose
(
pVnode
->
pTq
);
if
(
pVnode
->
pTsdb
)
tsdbClose
(
&
pVnode
->
pTsdb
);
if
(
pVnode
->
pTsdb
)
tsdbClose
(
&
pVnode
->
pTsdb
);
smaClose
(
pVnode
->
pSma
);
smaClose
(
pVnode
->
pSma
);
metaClose
(
pVnode
->
pMeta
);
if
(
pVnode
->
pMeta
)
metaClose
(
&
pVnode
->
pMeta
);
vnodeCloseBufPool
(
pVnode
);
vnodeCloseBufPool
(
pVnode
);
tsem_post
(
&
pVnode
->
canCommit
);
tsem_post
(
&
pVnode
->
canCommit
);
...
...
source/dnode/vnode/test/tsdbSmaTest.cpp
浏览文件 @
b929041e
...
@@ -283,7 +283,7 @@ TEST(testCase, tSma_metaDB_Put_Get_Del_Test) {
...
@@ -283,7 +283,7 @@ TEST(testCase, tSma_metaDB_Put_Get_Del_Test) {
metaRemoveSmaFromDb
(
pMeta
,
indexUid2
);
metaRemoveSmaFromDb
(
pMeta
,
indexUid2
);
tDestroyTSma
(
&
tSma
);
tDestroyTSma
(
&
tSma
);
metaClose
(
pMeta
);
metaClose
(
&
pMeta
);
}
}
#endif
#endif
...
@@ -577,9 +577,9 @@ TEST(testCase, tSma_Data_Insert_Query_Test) {
...
@@ -577,9 +577,9 @@ TEST(testCase, tSma_Data_Insert_Query_Test) {
tDestroyTSma
(
&
tSma
);
tDestroyTSma
(
&
tSma
);
tfsClose
(
pTsdb
->
pTfs
);
tfsClose
(
pTsdb
->
pTfs
);
tsdbClose
(
pTsdb
);
tsdbClose
(
pTsdb
);
metaClose
(
pMeta
);
metaClose
(
&
pMeta
);
}
}
#endif
#endif
#pragma GCC diagnostic pop
#pragma GCC diagnostic pop
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录