Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
bd531ccf
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1181
Star
22014
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
bd531ccf
编写于
1月 13, 2023
作者:
S
Shengliang Guan
提交者:
GitHub
1月 13, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #19542 from taosdata/enh/TD-20047
refact: adjust return value of tmsgUpdateDnodeInfo
上级
a184e8eb
cd0404bc
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
14 addition
and
14 deletion
+14
-14
include/common/tmsgcb.h
include/common/tmsgcb.h
+2
-2
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
+1
-1
source/dnode/mgmt/node_util/inc/dmUtil.h
source/dnode/mgmt/node_util/inc/dmUtil.h
+1
-1
source/dnode/mgmt/node_util/src/dmEps.c
source/dnode/mgmt/node_util/src/dmEps.c
+4
-4
source/dnode/mnode/impl/src/mndMnode.c
source/dnode/mnode/impl/src/mndMnode.c
+1
-1
source/dnode/mnode/impl/src/mndSync.c
source/dnode/mnode/impl/src/mndSync.c
+1
-1
source/dnode/vnode/src/vnd/vnodeOpen.c
source/dnode/vnode/src/vnd/vnodeOpen.c
+1
-1
source/libs/sync/src/syncMain.c
source/libs/sync/src/syncMain.c
+1
-1
source/libs/transport/src/tmsgcb.c
source/libs/transport/src/tmsgcb.c
+2
-2
未找到文件。
include/common/tmsgcb.h
浏览文件 @
bd531ccf
...
...
@@ -39,7 +39,7 @@ typedef enum {
QUEUE_MAX
,
}
EQueueType
;
typedef
int32_t
(
*
UpdateDnodeInfoFp
)(
void
*
pData
,
int32_t
*
dnodeId
,
int64_t
*
clusterId
,
char
*
fqdn
,
uint16_t
*
port
);
typedef
void
(
*
UpdateDnodeInfoFp
)(
void
*
pData
,
int32_t
*
dnodeId
,
int64_t
*
clusterId
,
char
*
fqdn
,
uint16_t
*
port
);
typedef
int32_t
(
*
PutToQueueFp
)(
void
*
pMgmt
,
EQueueType
qtype
,
SRpcMsg
*
pMsg
);
typedef
int32_t
(
*
GetQueueSizeFp
)(
void
*
pMgmt
,
int32_t
vgId
,
EQueueType
qtype
);
typedef
int32_t
(
*
SendReqFp
)(
const
SEpSet
*
pEpSet
,
SRpcMsg
*
pMsg
);
...
...
@@ -70,7 +70,7 @@ void tmsgSendRsp(SRpcMsg* pMsg);
void
tmsgRegisterBrokenLinkArg
(
SRpcMsg
*
pMsg
);
void
tmsgReleaseHandle
(
SRpcHandleInfo
*
pHandle
,
int8_t
type
);
void
tmsgReportStartup
(
const
char
*
name
,
const
char
*
desc
);
int32_t
tmsgUpdateDnodeInfo
(
int32_t
*
dnodeId
,
int64_t
*
clusterId
,
char
*
fqdn
,
uint16_t
*
port
);
void
tmsgUpdateDnodeInfo
(
int32_t
*
dnodeId
,
int64_t
*
clusterId
,
char
*
fqdn
,
uint16_t
*
port
);
#ifdef __cplusplus
}
...
...
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
浏览文件 @
bd531ccf
...
...
@@ -137,7 +137,7 @@ static void vmGenerateVnodeCfg(SCreateVnodeReq *pCreate, SVnodeCfg *pCfg) {
pNode
->
nodeId
=
pCreate
->
replicas
[
i
].
id
;
pNode
->
nodePort
=
pCreate
->
replicas
[
i
].
port
;
tstrncpy
(
pNode
->
nodeFqdn
,
pCreate
->
replicas
[
i
].
fqdn
,
TSDB_FQDN_LEN
);
(
void
)
tmsgUpdateDnodeInfo
(
&
pNode
->
nodeId
,
&
pNode
->
clusterId
,
pNode
->
nodeFqdn
,
&
pNode
->
nodePort
);
tmsgUpdateDnodeInfo
(
&
pNode
->
nodeId
,
&
pNode
->
clusterId
,
pNode
->
nodeFqdn
,
&
pNode
->
nodePort
);
}
}
...
...
source/dnode/mgmt/node_util/inc/dmUtil.h
浏览文件 @
bd531ccf
...
...
@@ -167,7 +167,7 @@ void dmUpdateEps(SDnodeData *pData, SArray *pDnodeEps);
void
dmGetMnodeEpSet
(
SDnodeData
*
pData
,
SEpSet
*
pEpSet
);
void
dmGetMnodeEpSetForRedirect
(
SDnodeData
*
pData
,
SRpcMsg
*
pMsg
,
SEpSet
*
pEpSet
);
void
dmSetMnodeEpSet
(
SDnodeData
*
pData
,
SEpSet
*
pEpSet
);
int32_t
dmUpdateDnodeInfo
(
void
*
pData
,
int32_t
*
dnodeId
,
int64_t
*
clusterId
,
char
*
fqdn
,
uint16_t
*
port
);
void
dmUpdateDnodeInfo
(
void
*
pData
,
int32_t
*
dnodeId
,
int64_t
*
clusterId
,
char
*
fqdn
,
uint16_t
*
port
);
#ifdef __cplusplus
}
...
...
source/dnode/mgmt/node_util/src/dmEps.c
浏览文件 @
bd531ccf
...
...
@@ -332,7 +332,7 @@ void dmSetMnodeEpSet(SDnodeData *pData, SEpSet *pEpSet) {
}
}
int32_t
dmUpdateDnodeInfo
(
void
*
data
,
int32_t
*
dnodeId
,
int64_t
*
clusterId
,
char
*
fqdn
,
uint16_t
*
port
)
{
void
dmUpdateDnodeInfo
(
void
*
data
,
int32_t
*
dnodeId
,
int64_t
*
clusterId
,
char
*
fqdn
,
uint16_t
*
port
)
{
SDnodeData
*
pData
=
data
;
int32_t
ret
=
-
1
;
taosThreadRwlockRdlock
(
&
pData
->
lock
);
...
...
@@ -342,7 +342,7 @@ int32_t dmUpdateDnodeInfo(void *data, int32_t *dnodeId, int64_t *clusterId, char
if
(
strcmp
(
pDnodeEp
->
ep
.
fqdn
,
fqdn
)
==
0
&&
pDnodeEp
->
ep
.
port
==
*
port
)
{
dInfo
(
"dnode:%s:%u, update dnodeId from %d to %d"
,
fqdn
,
*
port
,
*
dnodeId
,
pDnodeEp
->
id
);
*
dnodeId
=
pDnodeEp
->
id
;
*
clusterId
=
pData
->
clusterId
;
if
(
clusterId
!=
NULL
)
*
clusterId
=
pData
->
clusterId
;
ret
=
0
;
}
}
...
...
@@ -360,12 +360,12 @@ int32_t dmUpdateDnodeInfo(void *data, int32_t *dnodeId, int64_t *clusterId, char
dInfo
(
"dnode:%d, update port from %u to %u"
,
*
dnodeId
,
*
port
,
pDnodeEp
->
ep
.
port
);
*
port
=
pDnodeEp
->
ep
.
port
;
}
*
clusterId
=
pData
->
clusterId
;
if
(
clusterId
!=
NULL
)
*
clusterId
=
pData
->
clusterId
;
ret
=
0
;
}
else
{
dInfo
(
"dnode:%d, failed to update dnode info"
,
*
dnodeId
);
}
}
taosThreadRwlockUnlock
(
&
pData
->
lock
);
return
ret
;
//
return ret;
}
\ No newline at end of file
source/dnode/mnode/impl/src/mndMnode.c
浏览文件 @
bd531ccf
...
...
@@ -747,7 +747,7 @@ static void mndReloadSyncConfig(SMnode *pMnode) {
pNode
->
clusterId
=
mndGetClusterId
(
pMnode
);
pNode
->
nodePort
=
pObj
->
pDnode
->
port
;
tstrncpy
(
pNode
->
nodeFqdn
,
pObj
->
pDnode
->
fqdn
,
TSDB_FQDN_LEN
);
(
void
)
tmsgUpdateDnodeInfo
(
&
pNode
->
nodeId
,
&
pNode
->
clusterId
,
pNode
->
nodeFqdn
,
&
pNode
->
nodePort
);
tmsgUpdateDnodeInfo
(
&
pNode
->
nodeId
,
&
pNode
->
clusterId
,
pNode
->
nodeFqdn
,
&
pNode
->
nodePort
);
mInfo
(
"vgId:1, ep:%s:%u dnode:%d"
,
pNode
->
nodeFqdn
,
pNode
->
nodePort
,
pNode
->
nodeId
);
if
(
pObj
->
pDnode
->
id
==
pMnode
->
selfDnodeId
)
{
cfg
.
myIndex
=
cfg
.
replicaNum
;
...
...
source/dnode/mnode/impl/src/mndSync.c
浏览文件 @
bd531ccf
...
...
@@ -303,7 +303,7 @@ int32_t mndInitSync(SMnode *pMnode) {
pNode
->
nodeId
=
pMgmt
->
replicas
[
i
].
id
;
pNode
->
nodePort
=
pMgmt
->
replicas
[
i
].
port
;
tstrncpy
(
pNode
->
nodeFqdn
,
pMgmt
->
replicas
[
i
].
fqdn
,
sizeof
(
pNode
->
nodeFqdn
));
(
void
)
tmsgUpdateDnodeInfo
(
&
pNode
->
nodeId
,
&
pNode
->
clusterId
,
pNode
->
nodeFqdn
,
&
pNode
->
nodePort
);
tmsgUpdateDnodeInfo
(
&
pNode
->
nodeId
,
&
pNode
->
clusterId
,
pNode
->
nodeFqdn
,
&
pNode
->
nodePort
);
mInfo
(
"vgId:1, index:%d ep:%s:%u dnode:%d cluster:%"
PRId64
,
i
,
pNode
->
nodeFqdn
,
pNode
->
nodePort
,
pNode
->
nodeId
,
pNode
->
clusterId
);
}
...
...
source/dnode/vnode/src/vnd/vnodeOpen.c
浏览文件 @
bd531ccf
...
...
@@ -86,7 +86,7 @@ int32_t vnodeAlter(const char *path, SAlterVnodeReplicaReq *pReq, STfs *pTfs) {
pNode
->
nodeId
=
pReq
->
replicas
[
i
].
id
;
pNode
->
nodePort
=
pReq
->
replicas
[
i
].
port
;
tstrncpy
(
pNode
->
nodeFqdn
,
pReq
->
replicas
[
i
].
fqdn
,
sizeof
(
pNode
->
nodeFqdn
));
(
void
)
tmsgUpdateDnodeInfo
(
&
pNode
->
nodeId
,
&
pNode
->
clusterId
,
pNode
->
nodeFqdn
,
&
pNode
->
nodePort
);
tmsgUpdateDnodeInfo
(
&
pNode
->
nodeId
,
&
pNode
->
clusterId
,
pNode
->
nodeFqdn
,
&
pNode
->
nodePort
);
vInfo
(
"vgId:%d, replica:%d ep:%s:%u dnode:%d"
,
pReq
->
vgId
,
i
,
pNode
->
nodeFqdn
,
pNode
->
nodePort
,
pNode
->
nodeId
);
}
...
...
source/libs/sync/src/syncMain.c
浏览文件 @
bd531ccf
...
...
@@ -898,7 +898,7 @@ SSyncNode* syncNodeOpen(SSyncInfo* pSyncInfo) {
sInfo
(
"vgId:%d, start to open sync node, replica:%d selfIndex:%d"
,
pSyncNode
->
vgId
,
pCfg
->
replicaNum
,
pCfg
->
myIndex
);
for
(
int32_t
i
=
0
;
i
<
pCfg
->
replicaNum
;
++
i
)
{
SNodeInfo
*
pNode
=
&
pCfg
->
nodeInfo
[
i
];
(
void
)
tmsgUpdateDnodeInfo
(
&
pNode
->
nodeId
,
&
pNode
->
clusterId
,
pNode
->
nodeFqdn
,
&
pNode
->
nodePort
);
tmsgUpdateDnodeInfo
(
&
pNode
->
nodeId
,
&
pNode
->
clusterId
,
pNode
->
nodeFqdn
,
&
pNode
->
nodePort
);
sInfo
(
"vgId:%d, index:%d ep:%s:%u dnode:%d cluster:%"
PRId64
,
pSyncNode
->
vgId
,
i
,
pNode
->
nodeFqdn
,
pNode
->
nodePort
,
pNode
->
nodeId
,
pNode
->
clusterId
);
}
...
...
source/libs/transport/src/tmsgcb.c
浏览文件 @
bd531ccf
...
...
@@ -59,6 +59,6 @@ void tmsgReleaseHandle(SRpcHandleInfo* pHandle, int8_t type) { (*defaultMsgCb.re
void
tmsgReportStartup
(
const
char
*
name
,
const
char
*
desc
)
{
(
*
defaultMsgCb
.
reportStartupFp
)(
name
,
desc
);
}
int32_t
tmsgUpdateDnodeInfo
(
int32_t
*
dnodeId
,
int64_t
*
clusterId
,
char
*
fqdn
,
uint16_t
*
port
)
{
return
(
*
defaultMsgCb
.
updateDnodeInfoFp
)(
defaultMsgCb
.
data
,
dnodeId
,
clusterId
,
fqdn
,
port
);
void
tmsgUpdateDnodeInfo
(
int32_t
*
dnodeId
,
int64_t
*
clusterId
,
char
*
fqdn
,
uint16_t
*
port
)
{
(
*
defaultMsgCb
.
updateDnodeInfoFp
)(
defaultMsgCb
.
data
,
dnodeId
,
clusterId
,
fqdn
,
port
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录