Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
cb2527f7
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看板
提交
cb2527f7
编写于
5月 23, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: sync integrate into mnode
上级
68b7f694
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
0 addition
and
37 deletion
+0
-37
include/dnode/mnode/mnode.h
include/dnode/mnode/mnode.h
+0
-1
source/dnode/mgmt/mgmt_mnode/inc/mmInt.h
source/dnode/mgmt/mgmt_mnode/inc/mmInt.h
+0
-2
source/dnode/mgmt/mgmt_mnode/src/mmWorker.c
source/dnode/mgmt/mgmt_mnode/src/mmWorker.c
+0
-28
source/dnode/mnode/impl/src/mnode.c
source/dnode/mnode/impl/src/mnode.c
+0
-6
未找到文件。
include/dnode/mnode/mnode.h
浏览文件 @
cb2527f7
...
@@ -90,7 +90,6 @@ int32_t mndGetLoad(SMnode *pMnode, SMnodeLoad *pLoad);
...
@@ -90,7 +90,6 @@ int32_t mndGetLoad(SMnode *pMnode, SMnodeLoad *pLoad);
*/
*/
int32_t
mndProcessMsg
(
SRpcMsg
*
pMsg
);
int32_t
mndProcessMsg
(
SRpcMsg
*
pMsg
);
int32_t
mndProcessSyncMsg
(
SRpcMsg
*
pMsg
);
int32_t
mndProcessSyncMsg
(
SRpcMsg
*
pMsg
);
int32_t
mndProcessApplyMsg
(
SRpcMsg
*
pMsg
);
/**
/**
* @brief Generate machine code
* @brief Generate machine code
...
...
source/dnode/mgmt/mgmt_mnode/inc/mmInt.h
浏览文件 @
cb2527f7
...
@@ -33,7 +33,6 @@ typedef struct SMnodeMgmt {
...
@@ -33,7 +33,6 @@ typedef struct SMnodeMgmt {
SSingleWorker
readWorker
;
SSingleWorker
readWorker
;
SSingleWorker
writeWorker
;
SSingleWorker
writeWorker
;
SSingleWorker
syncWorker
;
SSingleWorker
syncWorker
;
SSingleWorker
applyWorker
;
SSingleWorker
monitorWorker
;
SSingleWorker
monitorWorker
;
SReplica
replicas
[
TSDB_MAX_REPLICA
];
SReplica
replicas
[
TSDB_MAX_REPLICA
];
int8_t
replica
;
int8_t
replica
;
...
@@ -60,7 +59,6 @@ int32_t mmStartWorker(SMnodeMgmt *pMgmt);
...
@@ -60,7 +59,6 @@ int32_t mmStartWorker(SMnodeMgmt *pMgmt);
void
mmStopWorker
(
SMnodeMgmt
*
pMgmt
);
void
mmStopWorker
(
SMnodeMgmt
*
pMgmt
);
int32_t
mmPutNodeMsgToWriteQueue
(
SMnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
);
int32_t
mmPutNodeMsgToWriteQueue
(
SMnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
);
int32_t
mmPutNodeMsgToSyncQueue
(
SMnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
);
int32_t
mmPutNodeMsgToSyncQueue
(
SMnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
);
int32_t
mmPutNodeMsgToApplyQueue
(
SMnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
);
int32_t
mmPutNodeMsgToReadQueue
(
SMnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
);
int32_t
mmPutNodeMsgToReadQueue
(
SMnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
);
int32_t
mmPutNodeMsgToQueryQueue
(
SMnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
);
int32_t
mmPutNodeMsgToQueryQueue
(
SMnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
);
int32_t
mmPutNodeMsgToMonitorQueue
(
SMnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
);
int32_t
mmPutNodeMsgToMonitorQueue
(
SMnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
);
...
...
source/dnode/mgmt/mgmt_mnode/src/mmWorker.c
浏览文件 @
cb2527f7
...
@@ -62,18 +62,6 @@ static void mmProcessSyncQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) {
...
@@ -62,18 +62,6 @@ static void mmProcessSyncQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) {
mndProcessSyncMsg
(
pMsg
);
mndProcessSyncMsg
(
pMsg
);
}
}
static
void
mmProcessApplyQueue
(
SQueueInfo
*
pInfo
,
SRpcMsg
*
pMsg
)
{
SMnodeMgmt
*
pMgmt
=
pInfo
->
ahandle
;
dTrace
(
"msg:%p, get from mnode-apply queue"
,
pMsg
);
pMsg
->
info
.
node
=
pMgmt
->
pMnode
;
mndProcessApplyMsg
(
pMsg
);
dTrace
(
"msg:%p, is freed"
,
pMsg
);
rpcFreeCont
(
pMsg
->
pCont
);
taosFreeQitem
(
pMsg
);
}
static
int32_t
mmPutNodeMsgToWorker
(
SSingleWorker
*
pWorker
,
SRpcMsg
*
pMsg
)
{
static
int32_t
mmPutNodeMsgToWorker
(
SSingleWorker
*
pWorker
,
SRpcMsg
*
pMsg
)
{
dTrace
(
"msg:%p, put into worker %s, type:%s"
,
pMsg
,
pWorker
->
name
,
TMSG_INFO
(
pMsg
->
msgType
));
dTrace
(
"msg:%p, put into worker %s, type:%s"
,
pMsg
,
pWorker
->
name
,
TMSG_INFO
(
pMsg
->
msgType
));
taosWriteQitem
(
pWorker
->
queue
,
pMsg
);
taosWriteQitem
(
pWorker
->
queue
,
pMsg
);
...
@@ -88,10 +76,6 @@ int32_t mmPutNodeMsgToSyncQueue(SMnodeMgmt *pMgmt, SRpcMsg *pMsg) {
...
@@ -88,10 +76,6 @@ int32_t mmPutNodeMsgToSyncQueue(SMnodeMgmt *pMgmt, SRpcMsg *pMsg) {
return
mmPutNodeMsgToWorker
(
&
pMgmt
->
syncWorker
,
pMsg
);
return
mmPutNodeMsgToWorker
(
&
pMgmt
->
syncWorker
,
pMsg
);
}
}
int32_t
mmPutNodeMsgToApplyQueue
(
SMnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
)
{
return
mmPutNodeMsgToWorker
(
&
pMgmt
->
applyWorker
,
pMsg
);
}
int32_t
mmPutNodeMsgToReadQueue
(
SMnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
)
{
int32_t
mmPutNodeMsgToReadQueue
(
SMnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
)
{
return
mmPutNodeMsgToWorker
(
&
pMgmt
->
readWorker
,
pMsg
);
return
mmPutNodeMsgToWorker
(
&
pMgmt
->
readWorker
,
pMsg
);
}
}
...
@@ -179,18 +163,6 @@ int32_t mmStartWorker(SMnodeMgmt *pMgmt) {
...
@@ -179,18 +163,6 @@ int32_t mmStartWorker(SMnodeMgmt *pMgmt) {
return
-
1
;
return
-
1
;
}
}
SSingleWorkerCfg
aCfg
=
{
.
min
=
1
,
.
max
=
1
,
.
name
=
"mnode-apply"
,
.
fp
=
(
FItem
)
mmProcessApplyQueue
,
.
param
=
pMgmt
,
};
if
(
tSingleWorkerInit
(
&
pMgmt
->
applyWorker
,
&
aCfg
)
!=
0
)
{
dError
(
"failed to start mnode mnode-apply worker since %s"
,
terrstr
());
return
-
1
;
}
SSingleWorkerCfg
mCfg
=
{
SSingleWorkerCfg
mCfg
=
{
.
min
=
1
,
.
min
=
1
,
.
max
=
1
,
.
max
=
1
,
...
...
source/dnode/mnode/impl/src/mnode.c
浏览文件 @
cb2527f7
...
@@ -346,12 +346,6 @@ void mndStop(SMnode *pMnode) {
...
@@ -346,12 +346,6 @@ void mndStop(SMnode *pMnode) {
return
mndCleanupTimer
(
pMnode
);
return
mndCleanupTimer
(
pMnode
);
}
}
int32_t
mndProcessApplyMsg
(
SRpcMsg
*
pMsg
)
{
SSdbRaw
*
pRaw
=
pMsg
->
pCont
;
SMnode
*
pMnode
=
pMsg
->
info
.
node
;
return
sdbWriteWithoutFree
(
pMnode
->
pSdb
,
pRaw
);
}
int32_t
mndProcessSyncMsg
(
SRpcMsg
*
pMsg
)
{
int32_t
mndProcessSyncMsg
(
SRpcMsg
*
pMsg
)
{
SMnode
*
pMnode
=
pMsg
->
info
.
node
;
SMnode
*
pMnode
=
pMsg
->
info
.
node
;
void
*
ahandle
=
pMsg
->
info
.
ahandle
;
void
*
ahandle
=
pMsg
->
info
.
ahandle
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录