Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
60edeb43
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看板
提交
60edeb43
编写于
8月 21, 2019
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix the issue #376
上级
8e11a6b8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
4 addition
and
20 deletion
+4
-20
src/connector/jdbc/CMakeLists.txt
src/connector/jdbc/CMakeLists.txt
+1
-1
src/inc/tglobalcfg.h
src/inc/tglobalcfg.h
+1
-0
src/modules/http/src/httpServer.c
src/modules/http/src/httpServer.c
+0
-18
src/util/src/tglobalcfg.c
src/util/src/tglobalcfg.c
+2
-1
未找到文件。
src/connector/jdbc/CMakeLists.txt
浏览文件 @
60edeb43
...
@@ -8,7 +8,7 @@ IF (TD_MVN_INSTALLED)
...
@@ -8,7 +8,7 @@ IF (TD_MVN_INSTALLED)
ADD_CUSTOM_COMMAND
(
OUTPUT
${
JDBC_CMD_NAME
}
ADD_CUSTOM_COMMAND
(
OUTPUT
${
JDBC_CMD_NAME
}
POST_BUILD
POST_BUILD
COMMAND mvn -Dmaven.test.skip=true install -f
${
CMAKE_CURRENT_SOURCE_DIR
}
/pom.xml
COMMAND mvn -Dmaven.test.skip=true install -f
${
CMAKE_CURRENT_SOURCE_DIR
}
/pom.xml
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
CMAKE_CURRENT_SOURCE_DIR
}
/target/taos-jdbcdriver
*dist.*
${
EXECUTABLE_OUTPUT_PATH
}
/../lib/
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
CMAKE_CURRENT_SOURCE_DIR
}
/target/taos-jdbcdriver
-1.0.1-dist.jar
${
LIBRARY_OUTPUT_PATH
}
COMMAND mvn -Dmaven.test.skip=true clean -f
${
CMAKE_CURRENT_SOURCE_DIR
}
/pom.xml
COMMAND mvn -Dmaven.test.skip=true clean -f
${
CMAKE_CURRENT_SOURCE_DIR
}
/pom.xml
COMMENT
"build jdbc driver"
)
COMMENT
"build jdbc driver"
)
ADD_CUSTOM_TARGET
(
${
JDBC_TARGET_NAME
}
ALL WORKING_DIRECTORY
${
EXECUTABLE_OUTPUT_PATH
}
DEPENDS
${
JDBC_CMD_NAME
}
)
ADD_CUSTOM_TARGET
(
${
JDBC_TARGET_NAME
}
ALL WORKING_DIRECTORY
${
EXECUTABLE_OUTPUT_PATH
}
DEPENDS
${
JDBC_CMD_NAME
}
)
...
...
src/inc/tglobalcfg.h
浏览文件 @
60edeb43
...
@@ -178,6 +178,7 @@ void tsInitGlobalConfig();
...
@@ -178,6 +178,7 @@ void tsInitGlobalConfig();
#define TSDB_CFG_CTYPE_B_LOG 4 // is a log type configuration
#define TSDB_CFG_CTYPE_B_LOG 4 // is a log type configuration
#define TSDB_CFG_CTYPE_B_CLIENT 8 // can be displayed in the client log
#define TSDB_CFG_CTYPE_B_CLIENT 8 // can be displayed in the client log
#define TSDB_CFG_CTYPE_B_OPTION 16 // can be configured by taos_options function
#define TSDB_CFG_CTYPE_B_OPTION 16 // can be configured by taos_options function
#define TSDB_CFG_CTYPE_B_NOT_PRINT 32
#define TSDB_CFG_CSTATUS_NONE 0 // not configured
#define TSDB_CFG_CSTATUS_NONE 0 // not configured
#define TSDB_CFG_CSTATUS_DEFAULT 1 // use system default value
#define TSDB_CFG_CSTATUS_DEFAULT 1 // use system default value
...
...
src/modules/http/src/httpServer.c
浏览文件 @
60edeb43
...
@@ -269,20 +269,6 @@ void httpCleanUpConnect(HttpServer *pServer) {
...
@@ -269,20 +269,6 @@ void httpCleanUpConnect(HttpServer *pServer) {
httpTrace
(
"http server:%s is cleaned up"
,
pServer
->
label
);
httpTrace
(
"http server:%s is cleaned up"
,
pServer
->
label
);
}
}
void
httpCloseDeadConnects
(
HttpThread
*
pThread
)
{
int32_t
thresholdSec
=
taosGetTimestampSec
()
-
3600
;
HttpContext
*
pContext
=
(
HttpContext
*
)
pThread
->
pHead
;
while
(
pContext
!=
NULL
&&
pContext
==
pContext
->
signature
)
{
HttpContext
*
pContextNext
=
pContext
->
next
;
if
(
pContext
->
lastAccessTime
<
thresholdSec
)
{
httpPrint
(
"context:%p, fd:%d, ip:%s, lastAccessTime:%d smaller then threshold:%d, so close it"
,
pContext
,
pContext
->
fd
,
pContext
->
ipstr
,
pContext
->
lastAccessTime
,
thresholdSec
);
httpCloseContextByServer
(
pThread
,
pContext
);
}
pContext
=
pContextNext
;
}
}
// read all the data, then just discard it
// read all the data, then just discard it
void
httpReadDirtyData
(
int
fd
)
{
void
httpReadDirtyData
(
int
fd
)
{
char
data
[
1024
]
=
{
0
};
char
data
[
1024
]
=
{
0
};
...
@@ -486,7 +472,6 @@ void httpAcceptHttpConnection(void *arg) {
...
@@ -486,7 +472,6 @@ void httpAcceptHttpConnection(void *arg) {
struct
sockaddr_in
clientAddr
;
struct
sockaddr_in
clientAddr
;
int
sockFd
;
int
sockFd
;
int
threadId
=
0
;
int
threadId
=
0
;
const
int
connThreshold
=
2
*
tsHttpCacheSessions
/
tsHttpMaxThreads
;
HttpThread
*
pThread
;
HttpThread
*
pThread
;
HttpServer
*
pServer
;
HttpServer
*
pServer
;
HttpContext
*
pContext
;
HttpContext
*
pContext
;
...
@@ -570,9 +555,6 @@ void httpAcceptHttpConnection(void *arg) {
...
@@ -570,9 +555,6 @@ void httpAcceptHttpConnection(void *arg) {
pContext
,
connFd
,
inet_ntoa
(
clientAddr
.
sin_addr
),
htons
(
clientAddr
.
sin_port
),
pThread
->
label
,
pContext
,
connFd
,
inet_ntoa
(
clientAddr
.
sin_addr
),
htons
(
clientAddr
.
sin_port
),
pThread
->
label
,
pThread
->
numOfFds
);
pThread
->
numOfFds
);
if
(
pThread
->
numOfFds
>
connThreshold
)
{
httpCloseDeadConnects
(
pThread
);
}
// pick up next thread for next connection
// pick up next thread for next connection
threadId
++
;
threadId
++
;
threadId
=
threadId
%
pServer
->
numOfThreads
;
threadId
=
threadId
%
pServer
->
numOfThreads
;
...
...
src/util/src/tglobalcfg.c
浏览文件 @
60edeb43
...
@@ -483,7 +483,7 @@ void tsInitGlobalConfig() {
...
@@ -483,7 +483,7 @@ void tsInitGlobalConfig() {
tsInitConfigOption
(
cfg
++
,
"defaultUser"
,
tsDefaultUser
,
TSDB_CFG_VTYPE_STRING
,
tsInitConfigOption
(
cfg
++
,
"defaultUser"
,
tsDefaultUser
,
TSDB_CFG_VTYPE_STRING
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
,
0
,
0
,
TSDB_USER_LEN
,
TSDB_CFG_UTYPE_NONE
);
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
,
0
,
0
,
TSDB_USER_LEN
,
TSDB_CFG_UTYPE_NONE
);
tsInitConfigOption
(
cfg
++
,
"defaultPass"
,
tsDefaultPass
,
TSDB_CFG_VTYPE_STRING
,
tsInitConfigOption
(
cfg
++
,
"defaultPass"
,
tsDefaultPass
,
TSDB_CFG_VTYPE_STRING
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
,
0
,
0
,
TSDB_PASSWORD_LEN
,
TSDB_CFG_UTYPE_NONE
);
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
|
TSDB_CFG_CTYPE_B_NOT_PRINT
,
0
,
0
,
TSDB_PASSWORD_LEN
,
TSDB_CFG_UTYPE_NONE
);
// locale & charset
// locale & charset
tsInitConfigOption
(
cfg
++
,
"timezone"
,
tsTimezone
,
TSDB_CFG_VTYPE_STRING
,
tsInitConfigOption
(
cfg
++
,
"timezone"
,
tsTimezone
,
TSDB_CFG_VTYPE_STRING
,
...
@@ -754,6 +754,7 @@ void tsPrintGlobalConfig() {
...
@@ -754,6 +754,7 @@ void tsPrintGlobalConfig() {
for
(
int
i
=
0
;
i
<
tsGlobalConfigNum
;
++
i
)
{
for
(
int
i
=
0
;
i
<
tsGlobalConfigNum
;
++
i
)
{
SGlobalConfig
*
cfg
=
tsGlobalConfig
+
i
;
SGlobalConfig
*
cfg
=
tsGlobalConfig
+
i
;
if
(
tscEmbedded
==
0
&&
!
(
cfg
->
cfgType
&
TSDB_CFG_CTYPE_B_CLIENT
))
continue
;
if
(
tscEmbedded
==
0
&&
!
(
cfg
->
cfgType
&
TSDB_CFG_CTYPE_B_CLIENT
))
continue
;
if
(
cfg
->
cfgType
&
TSDB_CFG_CTYPE_B_NOT_PRINT
)
continue
;
int
optionLen
=
(
int
)
strlen
(
cfg
->
option
);
int
optionLen
=
(
int
)
strlen
(
cfg
->
option
);
int
blankLen
=
TSDB_CFG_PRINT_LEN
-
optionLen
;
int
blankLen
=
TSDB_CFG_PRINT_LEN
-
optionLen
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录