Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
KASAKI11
TDengine
提交
995682f0
T
TDengine
项目概览
KASAKI11
/
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
995682f0
编写于
7月 15, 2020
作者:
陶建辉(Jeff)
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
merge develop code
上级
9ad7844d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
9 addition
and
8 deletion
+9
-8
src/inc/vnode.h
src/inc/vnode.h
+2
-3
src/vnode/inc/vnodeInt.h
src/vnode/inc/vnodeInt.h
+1
-0
src/vnode/src/vnodeMain.c
src/vnode/src/vnodeMain.c
+4
-3
src/vnode/src/vnodeRead.c
src/vnode/src/vnodeRead.c
+1
-1
src/vnode/src/vnodeWrite.c
src/vnode/src/vnodeWrite.c
+1
-1
未找到文件。
src/inc/vnode.h
浏览文件 @
995682f0
...
@@ -22,11 +22,10 @@ extern "C" {
...
@@ -22,11 +22,10 @@ extern "C" {
typedef
enum
_VN_STATUS
{
typedef
enum
_VN_STATUS
{
TAOS_VN_STATUS_INIT
,
TAOS_VN_STATUS_INIT
,
TAOS_VN_STATUS_UPDATING
,
TAOS_VN_STATUS_RESET
,
TAOS_VN_STATUS_READY
,
TAOS_VN_STATUS_READY
,
TAOS_VN_STATUS_CLOSING
,
TAOS_VN_STATUS_CLOSING
,
TAOS_VN_STATUS_DELETING
,
TAOS_VN_STATUS_UPDATING
,
TAOS_VN_STATUS_RESET
,
}
EVnStatus
;
}
EVnStatus
;
typedef
struct
{
typedef
struct
{
...
...
src/vnode/inc/vnodeInt.h
浏览文件 @
995682f0
...
@@ -56,6 +56,7 @@ typedef struct {
...
@@ -56,6 +56,7 @@ typedef struct {
void
*
qMgmt
;
void
*
qMgmt
;
char
*
rootDir
;
char
*
rootDir
;
tsem_t
sem
;
tsem_t
sem
;
int8_t
dropped
;
char
db
[
TSDB_DB_NAME_LEN
];
char
db
[
TSDB_DB_NAME_LEN
];
}
SVnodeObj
;
}
SVnodeObj
;
...
...
src/vnode/src/vnodeMain.c
浏览文件 @
995682f0
...
@@ -153,7 +153,7 @@ int32_t vnodeDrop(int32_t vgId) {
...
@@ -153,7 +153,7 @@ int32_t vnodeDrop(int32_t vgId) {
SVnodeObj
*
pVnode
=
*
ppVnode
;
SVnodeObj
*
pVnode
=
*
ppVnode
;
vTrace
(
"vgId:%d, vnode will be dropped, refCount:%d"
,
pVnode
->
vgId
,
pVnode
->
refCount
);
vTrace
(
"vgId:%d, vnode will be dropped, refCount:%d"
,
pVnode
->
vgId
,
pVnode
->
refCount
);
pVnode
->
status
=
TAOS_VN_STATUS_DELETING
;
pVnode
->
dropped
=
1
;
vnodeCleanUp
(
pVnode
);
vnodeCleanUp
(
pVnode
);
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
...
@@ -335,7 +335,6 @@ int32_t vnodeClose(int32_t vgId) {
...
@@ -335,7 +335,6 @@ int32_t vnodeClose(int32_t vgId) {
SVnodeObj
*
pVnode
=
*
ppVnode
;
SVnodeObj
*
pVnode
=
*
ppVnode
;
vDebug
(
"vgId:%d, vnode will be closed"
,
pVnode
->
vgId
);
vDebug
(
"vgId:%d, vnode will be closed"
,
pVnode
->
vgId
);
pVnode
->
status
=
TAOS_VN_STATUS_CLOSING
;
vnodeCleanUp
(
pVnode
);
vnodeCleanUp
(
pVnode
);
return
0
;
return
0
;
...
@@ -381,7 +380,7 @@ void vnodeRelease(void *pVnodeRaw) {
...
@@ -381,7 +380,7 @@ void vnodeRelease(void *pVnodeRaw) {
tfree
(
pVnode
->
rootDir
);
tfree
(
pVnode
->
rootDir
);
if
(
pVnode
->
status
==
TAOS_VN_STATUS_DELETING
)
{
if
(
pVnode
->
dropped
)
{
char
rootDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
rootDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
sprintf
(
rootDir
,
"%s/vnode%d"
,
tsVnodeDir
,
vgId
);
sprintf
(
rootDir
,
"%s/vnode%d"
,
tsVnodeDir
,
vgId
);
taosMvDir
(
tsVnodeBakDir
,
rootDir
);
taosMvDir
(
tsVnodeBakDir
,
rootDir
);
...
@@ -511,6 +510,8 @@ static void vnodeCleanUp(SVnodeObj *pVnode) {
...
@@ -511,6 +510,8 @@ static void vnodeCleanUp(SVnodeObj *pVnode) {
// remove from hash, so new messages wont be consumed
// remove from hash, so new messages wont be consumed
taosHashRemove
(
tsDnodeVnodesHash
,
(
const
char
*
)
&
pVnode
->
vgId
,
sizeof
(
int32_t
));
taosHashRemove
(
tsDnodeVnodesHash
,
(
const
char
*
)
&
pVnode
->
vgId
,
sizeof
(
int32_t
));
pVnode
->
status
=
TSDB_VN_STATUS_CLOSING
;
// stop replication module
// stop replication module
if
(
pVnode
->
sync
)
{
if
(
pVnode
->
sync
)
{
syncStop
(
pVnode
->
sync
);
syncStop
(
pVnode
->
sync
);
...
...
src/vnode/src/vnodeRead.c
浏览文件 @
995682f0
...
@@ -54,7 +54,7 @@ int32_t vnodeProcessRead(void *param, SReadMsg *pReadMsg) {
...
@@ -54,7 +54,7 @@ int32_t vnodeProcessRead(void *param, SReadMsg *pReadMsg) {
// tsdb may be in reset state
// tsdb may be in reset state
if
(
pVnode
->
tsdb
==
NULL
)
return
TSDB_CODE_RPC_NOT_READY
;
if
(
pVnode
->
tsdb
==
NULL
)
return
TSDB_CODE_RPC_NOT_READY
;
if
(
pVnode
->
status
==
TAOS_VN_STATUS_CLOSING
||
pVnode
->
status
==
TAOS_VN_STATUS_DELETING
)
if
(
pVnode
->
status
==
TAOS_VN_STATUS_CLOSING
)
return
TSDB_CODE_RPC_NOT_READY
;
return
TSDB_CODE_RPC_NOT_READY
;
// TODO: Later, let slave to support query
// TODO: Later, let slave to support query
...
...
src/vnode/src/vnodeWrite.c
浏览文件 @
995682f0
...
@@ -61,7 +61,7 @@ int32_t vnodeProcessWrite(void *param1, int qtype, void *param2, void *item) {
...
@@ -61,7 +61,7 @@ int32_t vnodeProcessWrite(void *param1, int qtype, void *param2, void *item) {
// tsdb may be in reset state
// tsdb may be in reset state
if
(
pVnode
->
tsdb
==
NULL
)
return
TSDB_CODE_RPC_NOT_READY
;
if
(
pVnode
->
tsdb
==
NULL
)
return
TSDB_CODE_RPC_NOT_READY
;
if
(
pVnode
->
status
==
TAOS_VN_STATUS_CLOSING
||
pVnode
->
status
==
TAOS_VN_STATUS_DELETING
)
if
(
pVnode
->
status
==
TAOS_VN_STATUS_CLOSING
)
return
TSDB_CODE_RPC_NOT_READY
;
return
TSDB_CODE_RPC_NOT_READY
;
if
(
pHead
->
version
==
0
)
{
// from client or CQ
if
(
pHead
->
version
==
0
)
{
// from client or CQ
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录