Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
0c21848b
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
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看板
未验证
提交
0c21848b
编写于
4月 21, 2020
作者:
S
slguan
提交者:
GitHub
4月 21, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1674 from taosdata/feature/mpeer
[TD-148] fix redirect message
上级
40d1cacc
db21aead
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
26 addition
and
12 deletion
+26
-12
src/client/src/tscServer.c
src/client/src/tscServer.c
+10
-8
src/client/src/tscSystem.c
src/client/src/tscSystem.c
+2
-0
src/mnode/src/mgmtShell.c
src/mnode/src/mgmtShell.c
+13
-3
tests/script/sh/deploy.sh
tests/script/sh/deploy.sh
+1
-1
未找到文件。
src/client/src/tscServer.c
浏览文件 @
0c21848b
...
@@ -68,11 +68,11 @@ void tscPrintMgmtIp() {
...
@@ -68,11 +68,11 @@ void tscPrintMgmtIp() {
}
}
void
tscSetMgmtIpListFromCluster
(
SRpcIpSet
*
pIpList
)
{
void
tscSetMgmtIpListFromCluster
(
SRpcIpSet
*
pIpList
)
{
tscMgmtIpList
.
numOfIps
=
htons
(
pIpList
->
numOfIps
)
;
tscMgmtIpList
.
numOfIps
=
pIpList
->
numOfIps
;
tscMgmtIpList
.
inUse
=
htons
(
pIpList
->
inUse
)
;
tscMgmtIpList
.
inUse
=
pIpList
->
inUse
;
tscMgmtIpList
.
port
=
htons
(
pIpList
->
port
);
tscMgmtIpList
.
port
=
htons
(
pIpList
->
port
);
for
(
int32_t
i
=
0
;
i
<
tscMgmtIpList
.
numOfIps
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
tscMgmtIpList
.
numOfIps
;
++
i
)
{
tscMgmtIpList
.
ip
[
i
]
=
pIpList
->
ip
[
i
]
;
tscMgmtIpList
.
ip
[
i
]
=
htonl
(
pIpList
->
ip
[
i
])
;
}
}
}
}
...
@@ -87,6 +87,11 @@ void tscSetMgmtIpListFromEdge() {
...
@@ -87,6 +87,11 @@ void tscSetMgmtIpListFromEdge() {
}
}
}
}
void
tscUpdateIpSet
(
void
*
ahandle
,
SRpcIpSet
*
pIpSet
)
{
tscTrace
(
"mgmt IP list is changed for ufp is called"
);
tscSetMgmtIpListFromCluster
(
pIpSet
);
}
void
tscSetMgmtIpList
(
SRpcIpSet
*
pIpList
)
{
void
tscSetMgmtIpList
(
SRpcIpSet
*
pIpList
)
{
/*
/*
* The iplist returned by the cluster edition is the current management nodes
* The iplist returned by the cluster edition is the current management nodes
...
@@ -2224,10 +2229,7 @@ int tscProcessConnectRsp(SSqlObj *pSql) {
...
@@ -2224,10 +2229,7 @@ int tscProcessConnectRsp(SSqlObj *pSql) {
assert
(
len
<=
tListLen
(
pObj
->
db
));
assert
(
len
<=
tListLen
(
pObj
->
db
));
strncpy
(
pObj
->
db
,
temp
,
tListLen
(
pObj
->
db
));
strncpy
(
pObj
->
db
,
temp
,
tListLen
(
pObj
->
db
));
// SIpList * pIpList;
tscSetMgmtIpList
(
&
pConnect
->
ipList
);
// char *rsp = pRes->pRsp + sizeof(SCMConnectRsp);
// pIpList = (SIpList *)rsp;
// tscSetMgmtIpList(pIpList);
strcpy
(
pObj
->
sversion
,
pConnect
->
serverVersion
);
strcpy
(
pObj
->
sversion
,
pConnect
->
serverVersion
);
pObj
->
writeAuth
=
pConnect
->
writeAuth
;
pObj
->
writeAuth
=
pConnect
->
writeAuth
;
...
...
src/client/src/tscSystem.c
浏览文件 @
0c21848b
...
@@ -47,6 +47,7 @@ int tscNumOfThreads;
...
@@ -47,6 +47,7 @@ int tscNumOfThreads;
static
pthread_once_t
tscinit
=
PTHREAD_ONCE_INIT
;
static
pthread_once_t
tscinit
=
PTHREAD_ONCE_INIT
;
void
taosInitNote
(
int
numOfNoteLines
,
int
maxNotes
,
char
*
lable
);
void
taosInitNote
(
int
numOfNoteLines
,
int
maxNotes
,
char
*
lable
);
void
tscUpdateIpSet
(
void
*
ahandle
,
SRpcIpSet
*
pIpSet
);
void
tscCheckDiskUsage
(
void
*
para
,
void
*
unused
)
{
void
tscCheckDiskUsage
(
void
*
para
,
void
*
unused
)
{
taosGetDisk
();
taosGetDisk
();
...
@@ -65,6 +66,7 @@ int32_t tscInitRpc(const char *user, const char *secret) {
...
@@ -65,6 +66,7 @@ int32_t tscInitRpc(const char *user, const char *secret) {
rpcInit
.
label
=
"TSC-vnode"
;
rpcInit
.
label
=
"TSC-vnode"
;
rpcInit
.
numOfThreads
=
tscNumOfThreads
;
rpcInit
.
numOfThreads
=
tscNumOfThreads
;
rpcInit
.
cfp
=
tscProcessMsgFromServer
;
rpcInit
.
cfp
=
tscProcessMsgFromServer
;
rpcInit
.
ufp
=
tscUpdateIpSet
;
rpcInit
.
sessions
=
tsMaxVnodeConnections
;
rpcInit
.
sessions
=
tsMaxVnodeConnections
;
rpcInit
.
connType
=
TAOS_CONN_CLIENT
;
rpcInit
.
connType
=
TAOS_CONN_CLIENT
;
rpcInit
.
user
=
(
char
*
)
user
;
rpcInit
.
user
=
(
char
*
)
user
;
...
...
src/mnode/src/mgmtShell.c
浏览文件 @
0c21848b
...
@@ -145,9 +145,14 @@ static void mgmtProcessMsgFromShell(SRpcMsg *rpcMsg) {
...
@@ -145,9 +145,14 @@ static void mgmtProcessMsgFromShell(SRpcMsg *rpcMsg) {
}
}
if
(
!
sdbIsMaster
())
{
if
(
!
sdbIsMaster
())
{
// rpcSendRedirectRsp(rpcMsg->handle, mgmtGetMnodeIpListForRedirect());
SRpcConnInfo
connInfo
;
mgmtSendSimpleResp
(
rpcMsg
->
handle
,
TSDB_CODE_NO_MASTER
);
rpcGetConnInfo
(
rpcMsg
->
handle
,
&
connInfo
);
rpcFreeCont
(
rpcMsg
->
pCont
);
bool
usePublicIp
=
(
connInfo
.
serverIp
==
tsPublicIpInt
);
SRpcIpSet
ipSet
=
{
0
};
mgmtGetMnodeIpList
(
&
ipSet
,
usePublicIp
);
mTrace
(
"conn from ip:%s user:%s redirect msg"
,
taosIpStr
(
connInfo
.
clientIp
),
connInfo
.
user
);
rpcSendRedirectRsp
(
rpcMsg
->
handle
,
&
ipSet
);
return
;
return
;
}
}
...
@@ -357,6 +362,11 @@ static int mgmtShellRetriveAuth(char *user, char *spi, char *encrypt, char *secr
...
@@ -357,6 +362,11 @@ static int mgmtShellRetriveAuth(char *user, char *spi, char *encrypt, char *secr
*
encrypt
=
0
;
*
encrypt
=
0
;
*
ckey
=
0
;
*
ckey
=
0
;
if
(
!
sdbIsMaster
())
{
*
secret
=
0
;
return
TSDB_CODE_SUCCESS
;
}
SUserObj
*
pUser
=
mgmtGetUser
(
user
);
SUserObj
*
pUser
=
mgmtGetUser
(
user
);
if
(
pUser
==
NULL
)
{
if
(
pUser
==
NULL
)
{
*
secret
=
0
;
*
secret
=
0
;
...
...
tests/script/sh/deploy.sh
浏览文件 @
0c21848b
...
@@ -93,7 +93,7 @@ echo "privateIp $NODE_IP" >> $TAOS_CFG
...
@@ -93,7 +93,7 @@ echo "privateIp $NODE_IP" >> $TAOS_CFG
echo
"dDebugFlag 199"
>>
$TAOS_CFG
echo
"dDebugFlag 199"
>>
$TAOS_CFG
echo
"mDebugFlag 199"
>>
$TAOS_CFG
echo
"mDebugFlag 199"
>>
$TAOS_CFG
echo
"sdbDebugFlag 199"
>>
$TAOS_CFG
echo
"sdbDebugFlag 199"
>>
$TAOS_CFG
echo
"rpcDebugFlag 13
1
"
>>
$TAOS_CFG
echo
"rpcDebugFlag 13
5
"
>>
$TAOS_CFG
echo
"tmrDebugFlag 131"
>>
$TAOS_CFG
echo
"tmrDebugFlag 131"
>>
$TAOS_CFG
echo
"cDebugFlag 135"
>>
$TAOS_CFG
echo
"cDebugFlag 135"
>>
$TAOS_CFG
echo
"httpDebugFlag 131"
>>
$TAOS_CFG
echo
"httpDebugFlag 131"
>>
$TAOS_CFG
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录