Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
哥们要飞
TDengine
提交
e10186e8
T
TDengine
项目概览
哥们要飞
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
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,发现更多精彩内容 >>
提交
e10186e8
编写于
4月 05, 2020
作者:
J
Jeff Tao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
re-arrange the head file to make it more logicl
上级
48fed13a
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
16 addition
and
22 deletion
+16
-22
src/dnode/inc/dnodeRead.h
src/dnode/inc/dnodeRead.h
+0
-2
src/dnode/inc/dnodeWrite.h
src/dnode/inc/dnodeWrite.h
+0
-2
src/dnode/src/dnodeWrite.c
src/dnode/src/dnodeWrite.c
+2
-5
src/inc/dnode.h
src/inc/dnode.h
+7
-0
src/inc/vnode.h
src/inc/vnode.h
+1
-2
src/vnode/main/inc/vnodeInt.h
src/vnode/main/inc/vnodeInt.h
+2
-1
src/vnode/main/src/vnodeMain.c
src/vnode/main/src/vnodeMain.c
+3
-5
src/vnode/main/src/vnodeWrite.c
src/vnode/main/src/vnodeWrite.c
+1
-5
未找到文件。
src/dnode/inc/dnodeRead.h
浏览文件 @
e10186e8
...
@@ -23,8 +23,6 @@ extern "C" {
...
@@ -23,8 +23,6 @@ extern "C" {
int32_t
dnodeInitRead
();
int32_t
dnodeInitRead
();
void
dnodeCleanupRead
();
void
dnodeCleanupRead
();
void
dnodeRead
(
SRpcMsg
*
pMsg
);
void
dnodeRead
(
SRpcMsg
*
pMsg
);
void
*
dnodeAllocateRqueue
();
void
dnodeFreeRqueue
(
void
*
rqueue
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
src/dnode/inc/dnodeWrite.h
浏览文件 @
e10186e8
...
@@ -23,8 +23,6 @@ extern "C" {
...
@@ -23,8 +23,6 @@ extern "C" {
int32_t
dnodeInitWrite
();
int32_t
dnodeInitWrite
();
void
dnodeCleanupWrite
();
void
dnodeCleanupWrite
();
void
dnodeWrite
(
SRpcMsg
*
pMsg
);
void
dnodeWrite
(
SRpcMsg
*
pMsg
);
void
*
dnodeAllocateWqueue
();
void
dnodeFreeWqueue
(
void
*
worker
);
void
dnodeSendWriteResponse
(
void
*
pVnode
,
void
*
param
,
int32_t
code
);
void
dnodeSendWriteResponse
(
void
*
pVnode
,
void
*
param
,
int32_t
code
);
#ifdef __cplusplus
#ifdef __cplusplus
...
...
src/dnode/src/dnodeWrite.c
浏览文件 @
e10186e8
...
@@ -46,14 +46,12 @@ typedef struct _thread_obj {
...
@@ -46,14 +46,12 @@ typedef struct _thread_obj {
SWriteWorker
*
writeWorker
;
SWriteWorker
*
writeWorker
;
}
SWriteWorkerPool
;
}
SWriteWorkerPool
;
static
void
*
dnodeProcessWriteQueue
(
void
*
param
);
static
void
*
dnodeProcessWriteQueue
(
void
*
param
);
static
void
dnodeHandleIdleWorker
(
SWriteWorker
*
pWorker
);
static
void
dnodeHandleIdleWorker
(
SWriteWorker
*
pWorker
);
SWriteWorkerPool
wWorkerPool
;
SWriteWorkerPool
wWorkerPool
;
int32_t
dnodeInitWrite
()
{
int32_t
dnodeInitWrite
()
{
vnodeInitWrite
();
wWorkerPool
.
max
=
tsNumOfCores
;
wWorkerPool
.
max
=
tsNumOfCores
;
wWorkerPool
.
writeWorker
=
(
SWriteWorker
*
)
calloc
(
sizeof
(
SWriteWorker
),
wWorkerPool
.
max
);
wWorkerPool
.
writeWorker
=
(
SWriteWorker
*
)
calloc
(
sizeof
(
SWriteWorker
),
wWorkerPool
.
max
);
...
@@ -217,7 +215,6 @@ static void *dnodeProcessWriteQueue(void *param) {
...
@@ -217,7 +215,6 @@ static void *dnodeProcessWriteQueue(void *param) {
return
NULL
;
return
NULL
;
}
}
static
void
dnodeHandleIdleWorker
(
SWriteWorker
*
pWorker
)
{
static
void
dnodeHandleIdleWorker
(
SWriteWorker
*
pWorker
)
{
int32_t
num
=
taosGetQueueNumber
(
pWorker
->
qset
);
int32_t
num
=
taosGetQueueNumber
(
pWorker
->
qset
);
...
...
src/inc/dnode.h
浏览文件 @
e10186e8
...
@@ -38,6 +38,13 @@ typedef enum {
...
@@ -38,6 +38,13 @@ typedef enum {
SDnodeRunStatus
dnodeGetRunStatus
();
SDnodeRunStatus
dnodeGetRunStatus
();
SDnodeStatisInfo
dnodeGetStatisInfo
();
SDnodeStatisInfo
dnodeGetStatisInfo
();
void
*
dnodeAllocateWqueue
(
void
*
pVnode
);
void
dnodeFreeWqueue
(
void
*
queue
);
void
*
dnodeAllocateRqueue
(
void
*
pVnode
);
void
dnodeFreeRqueue
(
void
*
rqueue
);
void
dnodeSendWriteResponse
(
void
*
pVnode
,
void
*
param
,
int32_t
code
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
...
src/inc/vnode.h
浏览文件 @
e10186e8
...
@@ -25,15 +25,14 @@ typedef struct {
...
@@ -25,15 +25,14 @@ typedef struct {
void
*
rsp
;
void
*
rsp
;
}
SRspRet
;
}
SRspRet
;
int32_t
vnodeInitWrite
();
int32_t
vnodeCreate
(
SMDCreateVnodeMsg
*
pVnodeCfg
);
int32_t
vnodeCreate
(
SMDCreateVnodeMsg
*
pVnodeCfg
);
int32_t
vnodeDrop
(
int32_t
vgId
);
int32_t
vnodeDrop
(
int32_t
vgId
);
int32_t
vnodeOpen
(
int32_t
vnode
,
char
*
rootDir
);
int32_t
vnodeOpen
(
int32_t
vnode
,
char
*
rootDir
);
int32_t
vnodeClose
(
void
*
pVnode
);
int32_t
vnodeClose
(
void
*
pVnode
);
void
vnodeRelease
(
void
*
pVnode
);
void
vnodeRelease
(
void
*
pVnode
);
void
*
vnodeGetVnode
(
int32_t
vgId
);
void
*
vnodeGetVnode
(
int32_t
vgId
);
void
*
vnodeGetRqueue
(
void
*
);
void
*
vnodeGetRqueue
(
void
*
);
void
*
vnodeGetWqueue
(
int32_t
vgId
);
void
*
vnodeGetWqueue
(
int32_t
vgId
);
void
*
vnodeGetWal
(
void
*
pVnode
);
void
*
vnodeGetWal
(
void
*
pVnode
);
...
...
src/vnode/main/inc/vnodeInt.h
浏览文件 @
e10186e8
...
@@ -43,7 +43,8 @@ typedef struct {
...
@@ -43,7 +43,8 @@ typedef struct {
void
*
cq
;
// continuous query
void
*
cq
;
// continuous query
}
SVnodeObj
;
}
SVnodeObj
;
int
vnodeWriteToQueue
(
void
*
param
,
SWalHead
*
pHead
,
int
type
);
int
vnodeWriteToQueue
(
void
*
param
,
SWalHead
*
pHead
,
int
type
);
void
vnodeInitWriteFp
(
void
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
src/vnode/main/src/vnodeMain.c
浏览文件 @
e10186e8
...
@@ -25,11 +25,6 @@
...
@@ -25,11 +25,6 @@
#include "ttime.h"
#include "ttime.h"
#include "ttimer.h"
#include "ttimer.h"
#include "twal.h"
#include "twal.h"
#include "dnodeMClient.h"
#include "dnodeMgmt.h"
#include "dnodeRead.h"
#include "dnodeWrite.h"
#include "vnode.h"
#include "vnodeInt.h"
#include "vnodeInt.h"
extern
void
*
tsDnodeVnodesHash
;
extern
void
*
tsDnodeVnodesHash
;
...
@@ -100,6 +95,9 @@ int32_t vnodeDrop(int32_t vgId) {
...
@@ -100,6 +95,9 @@ int32_t vnodeDrop(int32_t vgId) {
int32_t
vnodeOpen
(
int32_t
vnode
,
char
*
rootDir
)
{
int32_t
vnodeOpen
(
int32_t
vnode
,
char
*
rootDir
)
{
char
temp
[
TSDB_FILENAME_LEN
];
char
temp
[
TSDB_FILENAME_LEN
];
static
pthread_once_t
vnodeInitWrite
=
PTHREAD_ONCE_INIT
;
pthread_once
(
&
vnodeInitWrite
,
vnodeInitWriteFp
);
SVnodeObj
vnodeObj
=
{
0
};
SVnodeObj
vnodeObj
=
{
0
};
vnodeObj
.
vgId
=
vnode
;
vnodeObj
.
vgId
=
vnode
;
vnodeObj
.
status
=
VN_STATUS_INIT
;
vnodeObj
.
status
=
VN_STATUS_INIT
;
...
...
src/vnode/main/src/vnodeWrite.c
浏览文件 @
e10186e8
...
@@ -23,8 +23,6 @@
...
@@ -23,8 +23,6 @@
#include "tsdb.h"
#include "tsdb.h"
#include "twal.h"
#include "twal.h"
#include "dataformat.h"
#include "dataformat.h"
#include "dnodeWrite.h"
#include "dnodeMgmt.h"
#include "vnode.h"
#include "vnode.h"
#include "vnodeInt.h"
#include "vnodeInt.h"
...
@@ -35,14 +33,12 @@ static int32_t vnodeProcessDropTableMsg(SVnodeObj *pVnode, void *pMsg, SRspRet
...
@@ -35,14 +33,12 @@ static int32_t vnodeProcessDropTableMsg(SVnodeObj *pVnode, void *pMsg, SRspRet
static
int32_t
vnodeProcessAlterTableMsg
(
SVnodeObj
*
pVnode
,
void
*
pMsg
,
SRspRet
*
);
static
int32_t
vnodeProcessAlterTableMsg
(
SVnodeObj
*
pVnode
,
void
*
pMsg
,
SRspRet
*
);
static
int32_t
vnodeProcessDropStableMsg
(
SVnodeObj
*
pVnode
,
void
*
pMsg
,
SRspRet
*
);
static
int32_t
vnodeProcessDropStableMsg
(
SVnodeObj
*
pVnode
,
void
*
pMsg
,
SRspRet
*
);
int32_t
vnodeInitWrite
(
)
{
void
vnodeInitWriteFp
(
void
)
{
vnodeProcessWriteMsgFp
[
TSDB_MSG_TYPE_SUBMIT
]
=
vnodeProcessSubmitMsg
;
vnodeProcessWriteMsgFp
[
TSDB_MSG_TYPE_SUBMIT
]
=
vnodeProcessSubmitMsg
;
vnodeProcessWriteMsgFp
[
TSDB_MSG_TYPE_MD_CREATE_TABLE
]
=
vnodeProcessCreateTableMsg
;
vnodeProcessWriteMsgFp
[
TSDB_MSG_TYPE_MD_CREATE_TABLE
]
=
vnodeProcessCreateTableMsg
;
vnodeProcessWriteMsgFp
[
TSDB_MSG_TYPE_MD_DROP_TABLE
]
=
vnodeProcessDropTableMsg
;
vnodeProcessWriteMsgFp
[
TSDB_MSG_TYPE_MD_DROP_TABLE
]
=
vnodeProcessDropTableMsg
;
vnodeProcessWriteMsgFp
[
TSDB_MSG_TYPE_MD_ALTER_TABLE
]
=
vnodeProcessAlterTableMsg
;
vnodeProcessWriteMsgFp
[
TSDB_MSG_TYPE_MD_ALTER_TABLE
]
=
vnodeProcessAlterTableMsg
;
vnodeProcessWriteMsgFp
[
TSDB_MSG_TYPE_MD_DROP_STABLE
]
=
vnodeProcessDropStableMsg
;
vnodeProcessWriteMsgFp
[
TSDB_MSG_TYPE_MD_DROP_STABLE
]
=
vnodeProcessDropStableMsg
;
return
0
;
}
}
int32_t
vnodeProcessWrite
(
void
*
param
,
int
qtype
,
SWalHead
*
pHead
,
void
*
item
)
{
int32_t
vnodeProcessWrite
(
void
*
param
,
int
qtype
,
SWalHead
*
pHead
,
void
*
item
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录