Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
611b3978
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看板
提交
611b3978
编写于
12月 05, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-2324
上级
6f355840
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
24 addition
and
13 deletion
+24
-13
src/dnode/src/dnodeMain.c
src/dnode/src/dnodeMain.c
+2
-0
src/dnode/src/dnodeVMgmt.c
src/dnode/src/dnodeVMgmt.c
+10
-7
src/inc/taoserror.h
src/inc/taoserror.h
+1
-0
src/vnode/src/vnodeMgmt.c
src/vnode/src/vnodeMgmt.c
+6
-5
src/vnode/src/vnodeWorker.c
src/vnode/src/vnodeWorker.c
+5
-1
未找到文件。
src/dnode/src/dnodeMain.c
浏览文件 @
611b3978
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#include "tfile.h"
#include "tfile.h"
#include "twal.h"
#include "twal.h"
#include "tfs.h"
#include "tfs.h"
#include "tsync.h"
#include "dnodePeer.h"
#include "dnodePeer.h"
#include "dnodeModule.h"
#include "dnodeModule.h"
#include "dnodeEps.h"
#include "dnodeEps.h"
...
@@ -53,6 +54,7 @@ static SStep tsDnodeSteps[] = {
...
@@ -53,6 +54,7 @@ static SStep tsDnodeSteps[] = {
{
"dnode-eps"
,
dnodeInitEps
,
dnodeCleanupEps
},
{
"dnode-eps"
,
dnodeInitEps
,
dnodeCleanupEps
},
{
"dnode-minfos"
,
dnodeInitMInfos
,
dnodeCleanupMInfos
},
{
"dnode-minfos"
,
dnodeInitMInfos
,
dnodeCleanupMInfos
},
{
"dnode-wal"
,
walInit
,
walCleanUp
},
{
"dnode-wal"
,
walInit
,
walCleanUp
},
{
"dnode-sync"
,
syncInit
,
syncCleanUp
},
{
"dnode-check"
,
dnodeInitCheck
,
dnodeCleanupCheck
},
// NOTES: dnodeInitCheck must be behind the dnodeinitStorage component !!!
{
"dnode-check"
,
dnodeInitCheck
,
dnodeCleanupCheck
},
// NOTES: dnodeInitCheck must be behind the dnodeinitStorage component !!!
{
"dnode-vread"
,
dnodeInitVRead
,
dnodeCleanupVRead
},
{
"dnode-vread"
,
dnodeInitVRead
,
dnodeCleanupVRead
},
{
"dnode-vwrite"
,
dnodeInitVWrite
,
dnodeCleanupVWrite
},
{
"dnode-vwrite"
,
dnodeInitVWrite
,
dnodeCleanupVWrite
},
...
...
src/dnode/src/dnodeVMgmt.c
浏览文件 @
611b3978
...
@@ -49,13 +49,13 @@ int32_t dnodeInitVMgmt() {
...
@@ -49,13 +49,13 @@ int32_t dnodeInitVMgmt() {
tsMgmtQset
=
taosOpenQset
();
tsMgmtQset
=
taosOpenQset
();
if
(
tsMgmtQset
==
NULL
)
{
if
(
tsMgmtQset
==
NULL
)
{
dError
(
"failed to create the mgmt queue set"
);
dError
(
"failed to create the
v
mgmt queue set"
);
return
-
1
;
return
-
1
;
}
}
tsMgmtQueue
=
taosOpenQueue
();
tsMgmtQueue
=
taosOpenQueue
();
if
(
tsMgmtQueue
==
NULL
)
{
if
(
tsMgmtQueue
==
NULL
)
{
dError
(
"failed to create the mgmt queue"
);
dError
(
"failed to create the
v
mgmt queue"
);
return
-
1
;
return
-
1
;
}
}
...
@@ -68,11 +68,11 @@ int32_t dnodeInitVMgmt() {
...
@@ -68,11 +68,11 @@ int32_t dnodeInitVMgmt() {
code
=
pthread_create
(
&
tsQthread
,
&
thAttr
,
dnodeProcessMgmtQueue
,
NULL
);
code
=
pthread_create
(
&
tsQthread
,
&
thAttr
,
dnodeProcessMgmtQueue
,
NULL
);
pthread_attr_destroy
(
&
thAttr
);
pthread_attr_destroy
(
&
thAttr
);
if
(
code
!=
0
)
{
if
(
code
!=
0
)
{
dError
(
"failed to create thread to process mgmt queue, reason:%s"
,
strerror
(
errno
));
dError
(
"failed to create thread to process
v
mgmt queue, reason:%s"
,
strerror
(
errno
));
return
-
1
;
return
-
1
;
}
}
dInfo
(
"dnode mgmt is initialized"
);
dInfo
(
"dnode
v
mgmt is initialized"
);
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
}
}
...
@@ -133,9 +133,12 @@ static void *dnodeProcessMgmtQueue(void *param) {
...
@@ -133,9 +133,12 @@ static void *dnodeProcessMgmtQueue(void *param) {
rsp
.
code
=
TSDB_CODE_DND_MSG_NOT_PROCESSED
;
rsp
.
code
=
TSDB_CODE_DND_MSG_NOT_PROCESSED
;
}
}
rsp
.
handle
=
pMsg
->
handle
;
dDebug
(
"msg:%p, is processed, code:0x%x"
,
pMgmt
,
rsp
.
code
);
rsp
.
pCont
=
NULL
;
if
(
rsp
.
code
!=
TSDB_CODE_DND_ACTION_IN_PROGRESS
)
{
rpcSendResponse
(
&
rsp
);
rsp
.
handle
=
pMsg
->
handle
;
rsp
.
pCont
=
NULL
;
rpcSendResponse
(
&
rsp
);
}
taosFreeQitem
(
pMsg
);
taosFreeQitem
(
pMsg
);
}
}
...
...
src/inc/taoserror.h
浏览文件 @
611b3978
...
@@ -192,6 +192,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_DND_MSG_NOT_PROCESSED, 0, 0x0400, "Message no
...
@@ -192,6 +192,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_DND_MSG_NOT_PROCESSED, 0, 0x0400, "Message no
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_OUT_OF_MEMORY
,
0
,
0x0401
,
"Dnode out of memory"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_OUT_OF_MEMORY
,
0
,
0x0401
,
"Dnode out of memory"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_NO_WRITE_ACCESS
,
0
,
0x0402
,
"No permission for disk files in dnode"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_NO_WRITE_ACCESS
,
0
,
0x0402
,
"No permission for disk files in dnode"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_INVALID_MSG_LEN
,
0
,
0x0403
,
"Invalid message length"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_INVALID_MSG_LEN
,
0
,
0x0403
,
"Invalid message length"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_ACTION_IN_PROGRESS
,
0
,
0x0404
,
"Action in progress"
)
// vnode
// vnode
TAOS_DEFINE_ERROR
(
TSDB_CODE_VND_ACTION_IN_PROGRESS
,
0
,
0x0500
,
"Action in progress"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_VND_ACTION_IN_PROGRESS
,
0
,
0x0500
,
"Action in progress"
)
...
...
src/vnode/src/vnodeMgmt.c
浏览文件 @
611b3978
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
#include "os.h"
#include "os.h"
#include "dnode.h"
#include "dnode.h"
#include "vnodeStatus.h"
#include "vnodeStatus.h"
#include "vnodeWorker.h"
#include "vnodeRead.h"
#include "vnodeRead.h"
#include "vnodeWrite.h"
#include "vnodeWrite.h"
#include "vnodeMain.h"
#include "vnodeMain.h"
...
@@ -28,11 +29,11 @@ static void vnodeCleanupHash(void);
...
@@ -28,11 +29,11 @@ static void vnodeCleanupHash(void);
static
void
vnodeIncRef
(
void
*
ptNode
);
static
void
vnodeIncRef
(
void
*
ptNode
);
static
SStep
tsVnodeSteps
[]
=
{
static
SStep
tsVnodeSteps
[]
=
{
{
"v
sync"
,
syncInit
,
syncCleanUp
},
{
"v
node-worker"
,
vnodeInitMWorker
,
vnodeCleanupMWorker
},
{
"v
write"
,
vnodeInitWrite
,
vnodeCleanupWrite
},
{
"v
node-write"
,
vnodeInitWrite
,
vnodeCleanupWrite
},
{
"v
read"
,
vnodeInitRead
,
vnodeCleanupRead
},
{
"v
node-read"
,
vnodeInitRead
,
vnodeCleanupRead
},
{
"v
hash"
,
vnodeInitHash
,
vnodeCleanupHash
},
{
"v
node-hash"
,
vnodeInitHash
,
vnodeCleanupHash
},
{
"
vqueue"
,
tsdbInitCommitQueue
,
tsdbDestroyCommitQueue
}
{
"
tsdb-queue"
,
tsdbInitCommitQueue
,
tsdbDestroyCommitQueue
}
};
};
int32_t
vnodeInitMgmt
()
{
int32_t
vnodeInitMgmt
()
{
...
...
src/vnode/src/vnodeWorker.c
浏览文件 @
611b3978
...
@@ -143,7 +143,11 @@ static int32_t vnodeWriteIntoMWorker(int32_t vgId, EVMWorkerAction action,void *
...
@@ -143,7 +143,11 @@ static int32_t vnodeWriteIntoMWorker(int32_t vgId, EVMWorkerAction action,void *
pMsg
->
pVnode
=
pVnode
;
pMsg
->
pVnode
=
pVnode
;
pMsg
->
rpcHandle
=
rpcHandle
;
pMsg
->
rpcHandle
=
rpcHandle
;
pMsg
->
action
=
action
;
pMsg
->
action
=
action
;
return
taosWriteQitem
(
tsVMWorkerQueue
,
TAOS_QTYPE_RPC
,
pMsg
);
int32_t
code
=
taosWriteQitem
(
tsVMWorkerQueue
,
TAOS_QTYPE_RPC
,
pMsg
);
if
(
code
==
0
)
code
=
TSDB_CODE_DND_ACTION_IN_PROGRESS
;
return
code
;
}
}
int32_t
vnodeOpenInMWorker
(
int32_t
vgId
,
void
*
rpcHandle
)
{
int32_t
vnodeOpenInMWorker
(
int32_t
vgId
,
void
*
rpcHandle
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录