Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
7ab2b0a8
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
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看板
提交
7ab2b0a8
编写于
3月 16, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
shm
上级
e10e8c8f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
22 addition
and
14 deletion
+22
-14
source/dnode/mgmt/dnode/inc/dmInt.h
source/dnode/mgmt/dnode/inc/dmInt.h
+13
-12
source/dnode/mgmt/dnode/src/dmInt.c
source/dnode/mgmt/dnode/src/dmInt.c
+1
-0
source/dnode/mgmt/dnode/src/dmMsg.c
source/dnode/mgmt/dnode/src/dmMsg.c
+1
-1
source/dnode/mgmt/vnode/src/vmInt.c
source/dnode/mgmt/vnode/src/vmInt.c
+7
-1
未找到文件。
source/dnode/mgmt/dnode/inc/dmInt.h
浏览文件 @
7ab2b0a8
...
@@ -23,18 +23,19 @@ extern "C" {
...
@@ -23,18 +23,19 @@ extern "C" {
#endif
#endif
typedef
struct
SDnodeMgmt
{
typedef
struct
SDnodeMgmt
{
int64_t
dver
;
int64_t
dver
;
int64_t
updateTime
;
int64_t
updateTime
;
int8_t
statusSent
;
int8_t
statusSent
;
SEpSet
mnodeEpSet
;
SEpSet
mnodeEpSet
;
SHashObj
*
dnodeHash
;
SHashObj
*
dnodeHash
;
SArray
*
dnodeEps
;
SArray
*
dnodeEps
;
pthread_t
*
threadId
;
pthread_t
*
threadId
;
SRWLatch
latch
;
SRWLatch
latch
;
SDnodeWorker
mgmtWorker
;
SDnodeWorker
mgmtWorker
;
SDnodeWorker
statusWorker
;
SDnodeWorker
statusWorker
;
const
char
*
path
;
const
char
*
path
;
SDnode
*
pDnode
;
SDnode
*
pDnode
;
SMgmtWrapper
*
pWrapper
;
}
SDnodeMgmt
;
}
SDnodeMgmt
;
// dmFile.c
// dmFile.c
...
...
source/dnode/mgmt/dnode/src/dmInt.c
浏览文件 @
7ab2b0a8
...
@@ -92,6 +92,7 @@ int32_t dmInit(SMgmtWrapper *pWrapper) {
...
@@ -92,6 +92,7 @@ int32_t dmInit(SMgmtWrapper *pWrapper) {
pDnode
->
clusterId
=
0
;
pDnode
->
clusterId
=
0
;
pMgmt
->
path
=
pWrapper
->
path
;
pMgmt
->
path
=
pWrapper
->
path
;
pMgmt
->
pDnode
=
pDnode
;
pMgmt
->
pDnode
=
pDnode
;
pMgmt
->
pWrapper
=
pWrapper
;
taosInitRWLatch
(
&
pMgmt
->
latch
);
taosInitRWLatch
(
&
pMgmt
->
latch
);
pMgmt
->
dnodeHash
=
taosHashInit
(
4
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_INT
),
true
,
HASH_NO_LOCK
);
pMgmt
->
dnodeHash
=
taosHashInit
(
4
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_INT
),
true
,
HASH_NO_LOCK
);
...
...
source/dnode/mgmt/dnode/src/dmMsg.c
浏览文件 @
7ab2b0a8
...
@@ -53,7 +53,7 @@ void dmSendStatusReq(SDnodeMgmt *pMgmt) {
...
@@ -53,7 +53,7 @@ void dmSendStatusReq(SDnodeMgmt *pMgmt) {
pMgmt
->
statusSent
=
1
;
pMgmt
->
statusSent
=
1
;
dTrace
(
"send req:%s to mnode, app:%p"
,
TMSG_INFO
(
rpcMsg
.
msgType
),
rpcMsg
.
ahandle
);
dTrace
(
"send req:%s to mnode, app:%p"
,
TMSG_INFO
(
rpcMsg
.
msgType
),
rpcMsg
.
ahandle
);
dndSendReqToMnode
(
pMgmt
->
pDnode
,
&
rpcMsg
);
dndSendReqToMnode
(
pMgmt
->
dnodeEps
,
&
rpcMsg
);
}
}
static
void
dmUpdateDnodeCfg
(
SDnodeMgmt
*
pMgmt
,
SDnodeCfg
*
pCfg
)
{
static
void
dmUpdateDnodeCfg
(
SDnodeMgmt
*
pMgmt
,
SDnodeCfg
*
pCfg
)
{
...
...
source/dnode/mgmt/vnode/src/vmInt.c
浏览文件 @
7ab2b0a8
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
#include "vmFile.h"
#include "vmFile.h"
#include "vmMsg.h"
#include "vmMsg.h"
#include "vmWorker.h"
#include "vmWorker.h"
#include "sync.h"
#include "sync.h"
SVnodeObj
*
vmAcquireVnode
(
SVnodesMgmt
*
pMgmt
,
int32_t
vgId
)
{
SVnodeObj
*
vmAcquireVnode
(
SVnodesMgmt
*
pMgmt
,
int32_t
vgId
)
{
...
@@ -317,6 +318,8 @@ static int32_t vmInit(SMgmtWrapper *pWrapper) {
...
@@ -317,6 +318,8 @@ static int32_t vmInit(SMgmtWrapper *pWrapper) {
return
-
1
;
return
-
1
;
}
}
code
=
0
;
_OVER:
_OVER:
if
(
code
==
0
)
{
if
(
code
==
0
)
{
pWrapper
->
pMgmt
=
pMgmt
;
pWrapper
->
pMgmt
=
pMgmt
;
...
@@ -329,7 +332,10 @@ _OVER:
...
@@ -329,7 +332,10 @@ _OVER:
return
0
;
return
0
;
}
}
static
bool
vmRequire
(
SMgmtWrapper
*
pWrapper
)
{
return
false
;
}
static
bool
vmRequire
(
SMgmtWrapper
*
pWrapper
)
{
SDnode
*
pDnode
=
pWrapper
->
pDnode
;
return
pDnode
->
numOfSupportVnodes
>
0
;
}
void
vmGetMgmtFp
(
SMgmtWrapper
*
pWrapper
)
{
void
vmGetMgmtFp
(
SMgmtWrapper
*
pWrapper
)
{
SMgmtFp
mgmtFp
=
{
0
};
SMgmtFp
mgmtFp
=
{
0
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录