Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
be4fd983
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看板
提交
be4fd983
编写于
1月 27, 2021
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-2785]<enhance>: Allow to judge the status of sync and arbitrator ports
上级
0a46dd0f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
13 addition
and
4 deletion
+13
-4
src/kit/shell/src/shellLinux.c
src/kit/shell/src/shellLinux.c
+1
-1
src/kit/shell/src/shellWindows.c
src/kit/shell/src/shellWindows.c
+1
-1
src/sync/src/syncArbitrator.c
src/sync/src/syncArbitrator.c
+6
-0
src/sync/src/syncMain.c
src/sync/src/syncMain.c
+1
-1
src/util/src/tnettest.c
src/util/src/tnettest.c
+4
-1
未找到文件。
src/kit/shell/src/shellLinux.c
浏览文件 @
be4fd983
...
...
@@ -47,7 +47,7 @@ static struct argp_option options[] = {
{
"thread"
,
'T'
,
"THREADNUM"
,
0
,
"Number of threads when using multi-thread to import data."
},
{
"database"
,
'd'
,
"DATABASE"
,
0
,
"Database to use when connecting to the server."
},
{
"timezone"
,
't'
,
"TIMEZONE"
,
0
,
"Time zone of the shell, default is local."
},
{
"netrole"
,
'n'
,
"NETROLE"
,
0
,
"Net role when network connectivity test, default is startup, options: client|server|rpc|startup."
},
{
"netrole"
,
'n'
,
"NETROLE"
,
0
,
"Net role when network connectivity test, default is startup, options: client|server|rpc|startup
|sync
."
},
{
"pktlen"
,
'l'
,
"PKTLEN"
,
0
,
"Packet length used for net test, default is 1000 bytes."
},
{
0
}};
...
...
src/kit/shell/src/shellWindows.c
浏览文件 @
be4fd983
...
...
@@ -52,7 +52,7 @@ void printHelp() {
printf
(
"%s%s
\n
"
,
indent
,
"-t"
);
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"Time zone of the shell, default is local."
);
printf
(
"%s%s
\n
"
,
indent
,
"-n"
);
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"Net role when network connectivity test, default is startup, options: client|server|rpc|startup."
);
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"Net role when network connectivity test, default is startup, options: client|server|rpc|startup
|sync
."
);
printf
(
"%s%s
\n
"
,
indent
,
"-l"
);
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"Packet length used for net test, default is 1000 bytes."
);
printf
(
"%s%s
\n
"
,
indent
,
"-V"
);
...
...
src/sync/src/syncArbitrator.c
浏览文件 @
be4fd983
...
...
@@ -27,6 +27,7 @@
#include "syncInt.h"
#include "syncTcp.h"
extern
void
syncProcessTestMsg
(
SSyncMsg
*
pMsg
,
SOCKET
connFd
);
static
void
arbSignalHandler
(
int32_t
signum
,
void
*
sigInfo
,
void
*
context
);
static
void
arbProcessIncommingConnection
(
SOCKET
connFd
,
uint32_t
sourceIp
);
static
void
arbProcessBrokenLink
(
int64_t
rid
);
...
...
@@ -118,6 +119,11 @@ static void arbProcessIncommingConnection(SOCKET connFd, uint32_t sourceIp) {
return
;
}
if
(
msg
.
head
.
type
==
TAOS_SMSG_TEST
)
{
syncProcessTestMsg
(
&
msg
,
connFd
);
return
;
}
SNodeConn
*
pNode
=
calloc
(
sizeof
(
SNodeConn
),
1
);
if
(
pNode
==
NULL
)
{
sError
(
"failed to allocate memory since %s"
,
strerror
(
errno
));
...
...
src/sync/src/syncMain.c
浏览文件 @
be4fd983
...
...
@@ -1179,7 +1179,7 @@ static void syncCreateRestoreDataThread(SSyncPeer *pPeer) {
}
}
static
void
syncProcessTestMsg
(
SSyncMsg
*
pMsg
,
SOCKET
connFd
)
{
void
syncProcessTestMsg
(
SSyncMsg
*
pMsg
,
SOCKET
connFd
)
{
sInfo
(
"recv sync test msg"
);
SSyncMsg
rsp
;
...
...
src/util/src/tnettest.c
浏览文件 @
be4fd983
...
...
@@ -483,7 +483,8 @@ static void taosNetTestRpc(char *host, int32_t startPort, int32_t pkgLen) {
}
}
taosNetCheckSync
(
host
,
endPort
);
taosNetCheckSync
(
host
,
startPort
+
TSDB_PORT_SYNC
);
taosNetCheckSync
(
host
,
startPort
+
TSDB_PORT_ARBITRATOR
);
}
static
void
taosNetTestClient
(
char
*
host
,
int32_t
startPort
,
int32_t
pkgLen
)
{
...
...
@@ -550,6 +551,8 @@ void taosNetTest(char *role, char *host, int32_t port, int32_t pkgLen) {
taosNetTestServer
(
host
,
port
,
pkgLen
);
}
else
if
(
0
==
strcmp
(
"rpc"
,
role
))
{
taosNetTestRpc
(
host
,
port
,
pkgLen
);
}
else
if
(
0
==
strcmp
(
"sync"
,
role
))
{
taosNetCheckSync
(
host
,
port
);
}
else
if
(
0
==
strcmp
(
"startup"
,
role
))
{
taosNetTestStartup
(
host
,
port
);
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录