Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
37a0b9c7
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
37a0b9c7
编写于
10月 11, 2022
作者:
dengyihao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support compress
上级
4507776c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
14 addition
and
9 deletion
+14
-9
include/libs/transport/trpc.h
include/libs/transport/trpc.h
+2
-2
source/client/src/clientEnv.c
source/client/src/clientEnv.c
+4
-2
source/client/src/clientImpl.c
source/client/src/clientImpl.c
+5
-4
source/dnode/mgmt/node_mgmt/src/dmTransport.c
source/dnode/mgmt/node_mgmt/src/dmTransport.c
+1
-0
source/libs/function/src/udfd.c
source/libs/function/src/udfd.c
+2
-1
未找到文件。
include/libs/transport/trpc.h
浏览文件 @
37a0b9c7
...
@@ -82,8 +82,8 @@ typedef struct SRpcInit {
...
@@ -82,8 +82,8 @@ typedef struct SRpcInit {
int8_t
connType
;
// TAOS_CONN_UDP, TAOS_CONN_TCPC, TAOS_CONN_TCPS
int8_t
connType
;
// TAOS_CONN_UDP, TAOS_CONN_TCPC, TAOS_CONN_TCPS
int32_t
idleTime
;
// milliseconds, 0 means idle timer is disabled
int32_t
idleTime
;
// milliseconds, 0 means idle timer is disabled
const
int32_t
compressSize
;
// -1: no compress, 0 : all data compressed, size: compress data if larger than size
int32_t
compressSize
;
// -1: no compress, 0 : all data compressed, size: compress data if larger than size
const
int8_t
encryption
;
// encrypt or not
int8_t
encryption
;
// encrypt or not
// the following is for client app ecurity only
// the following is for client app ecurity only
char
*
user
;
// user name
char
*
user
;
// user name
...
...
source/client/src/clientEnv.c
浏览文件 @
37a0b9c7
...
@@ -71,7 +71,8 @@ static void deregisterRequest(SRequestObj *pRequest) {
...
@@ -71,7 +71,8 @@ static void deregisterRequest(SRequestObj *pRequest) {
int32_t
num
=
atomic_sub_fetch_32
(
&
pTscObj
->
numOfReqs
,
1
);
int32_t
num
=
atomic_sub_fetch_32
(
&
pTscObj
->
numOfReqs
,
1
);
int64_t
duration
=
taosGetTimestampUs
()
-
pRequest
->
metric
.
start
;
int64_t
duration
=
taosGetTimestampUs
()
-
pRequest
->
metric
.
start
;
tscDebug
(
"0x%"
PRIx64
" free Request from connObj: 0x%"
PRIx64
", reqId:0x%"
PRIx64
" elapsed:%.2f ms, "
tscDebug
(
"0x%"
PRIx64
" free Request from connObj: 0x%"
PRIx64
", reqId:0x%"
PRIx64
" elapsed:%.2f ms, "
"current:%d, app current:%d"
,
"current:%d, app current:%d"
,
pRequest
->
self
,
pTscObj
->
id
,
pRequest
->
requestId
,
duration
/
1000
.
0
,
num
,
currentInst
);
pRequest
->
self
,
pTscObj
->
id
,
pRequest
->
requestId
,
duration
/
1000
.
0
,
num
,
currentInst
);
...
@@ -84,7 +85,7 @@ static void deregisterRequest(SRequestObj *pRequest) {
...
@@ -84,7 +85,7 @@ static void deregisterRequest(SRequestObj *pRequest) {
atomic_add_fetch_64
((
int64_t
*
)
&
pActivity
->
insertElapsedTime
,
duration
);
atomic_add_fetch_64
((
int64_t
*
)
&
pActivity
->
insertElapsedTime
,
duration
);
}
else
if
(
QUERY_NODE_SELECT_STMT
==
pRequest
->
stmtType
)
{
}
else
if
(
QUERY_NODE_SELECT_STMT
==
pRequest
->
stmtType
)
{
tscPerf
(
"select duration %"
PRId64
"us: syntax:%"
PRId64
"us, ctg:%"
PRId64
"us, semantic:%"
PRId64
tscPerf
(
"select duration %"
PRId64
"us: syntax:%"
PRId64
"us, ctg:%"
PRId64
"us, semantic:%"
PRId64
"us, planner:%"
PRId64
"us, exec:%"
PRId64
"us, reqId:0x%"
PRIx64
,
"us, planner:%"
PRId64
"us, exec:%"
PRId64
"us, reqId:0x%"
PRIx64
,
duration
,
pRequest
->
metric
.
syntaxEnd
-
pRequest
->
metric
.
syntaxStart
,
duration
,
pRequest
->
metric
.
syntaxEnd
-
pRequest
->
metric
.
syntaxStart
,
pRequest
->
metric
.
ctgEnd
-
pRequest
->
metric
.
ctgStart
,
pRequest
->
metric
.
semanticEnd
-
pRequest
->
metric
.
ctgEnd
,
pRequest
->
metric
.
ctgEnd
-
pRequest
->
metric
.
ctgStart
,
pRequest
->
metric
.
semanticEnd
-
pRequest
->
metric
.
ctgEnd
,
pRequest
->
metric
.
planEnd
-
pRequest
->
metric
.
semanticEnd
,
pRequest
->
metric
.
planEnd
-
pRequest
->
metric
.
semanticEnd
,
...
@@ -144,6 +145,7 @@ void *openTransporter(const char *user, const char *auth, int32_t numOfThread) {
...
@@ -144,6 +145,7 @@ void *openTransporter(const char *user, const char *auth, int32_t numOfThread) {
rpcInit
.
connType
=
TAOS_CONN_CLIENT
;
rpcInit
.
connType
=
TAOS_CONN_CLIENT
;
rpcInit
.
user
=
(
char
*
)
user
;
rpcInit
.
user
=
(
char
*
)
user
;
rpcInit
.
idleTime
=
tsShellActivityTimer
*
1000
;
rpcInit
.
idleTime
=
tsShellActivityTimer
*
1000
;
rpcInit
.
compressSize
=
tsCompressMsgSize
;
void
*
pDnodeConn
=
rpcOpen
(
&
rpcInit
);
void
*
pDnodeConn
=
rpcOpen
(
&
rpcInit
);
if
(
pDnodeConn
==
NULL
)
{
if
(
pDnodeConn
==
NULL
)
{
tscError
(
"failed to init connection to server"
);
tscError
(
"failed to init connection to server"
);
...
...
source/client/src/clientImpl.c
浏览文件 @
37a0b9c7
...
@@ -868,10 +868,10 @@ int32_t handleQueryExecRsp(SRequestObj* pRequest) {
...
@@ -868,10 +868,10 @@ int32_t handleQueryExecRsp(SRequestObj* pRequest) {
return
code
;
return
code
;
}
}
//todo refacto the error code mgmt
//
todo refacto the error code mgmt
void
schedulerExecCb
(
SExecResult
*
pResult
,
void
*
param
,
int32_t
code
)
{
void
schedulerExecCb
(
SExecResult
*
pResult
,
void
*
param
,
int32_t
code
)
{
SRequestObj
*
pRequest
=
(
SRequestObj
*
)
param
;
SRequestObj
*
pRequest
=
(
SRequestObj
*
)
param
;
STscObj
*
pTscObj
=
pRequest
->
pTscObj
;
STscObj
*
pTscObj
=
pRequest
->
pTscObj
;
pRequest
->
code
=
code
;
pRequest
->
code
=
code
;
if
(
pResult
)
{
if
(
pResult
)
{
...
@@ -899,8 +899,8 @@ void schedulerExecCb(SExecResult* pResult, void* param, int32_t code) {
...
@@ -899,8 +899,8 @@ void schedulerExecCb(SExecResult* pResult, void* param, int32_t code) {
pRequest
->
requestId
);
pRequest
->
requestId
);
if
(
code
!=
TSDB_CODE_SUCCESS
&&
NEED_CLIENT_HANDLE_ERROR
(
code
)
&&
pRequest
->
sqlstr
!=
NULL
)
{
if
(
code
!=
TSDB_CODE_SUCCESS
&&
NEED_CLIENT_HANDLE_ERROR
(
code
)
&&
pRequest
->
sqlstr
!=
NULL
)
{
tscDebug
(
"0x%"
PRIx64
" client retry to handle the error, code:%s, tryCount:%d, reqId:0x%"
PRIx64
,
tscDebug
(
"0x%"
PRIx64
" client retry to handle the error, code:%s, tryCount:%d, reqId:0x%"
PRIx64
,
pRequest
->
self
,
pRequest
->
self
,
tstrerror
(
code
),
pRequest
->
retry
,
pRequest
->
requestId
);
tstrerror
(
code
),
pRequest
->
retry
,
pRequest
->
requestId
);
pRequest
->
prevCode
=
code
;
pRequest
->
prevCode
=
code
;
schedulerFreeJob
(
&
pRequest
->
body
.
queryJob
,
0
);
schedulerFreeJob
(
&
pRequest
->
body
.
queryJob
,
0
);
qDestroyQuery
(
pRequest
->
pQuery
);
qDestroyQuery
(
pRequest
->
pQuery
);
...
@@ -1970,6 +1970,7 @@ TSDB_SERVER_STATUS taos_check_server_status(const char* fqdn, int port, char* de
...
@@ -1970,6 +1970,7 @@ TSDB_SERVER_STATUS taos_check_server_status(const char* fqdn, int port, char* de
rpcInit
.
sessions
=
16
;
rpcInit
.
sessions
=
16
;
rpcInit
.
connType
=
TAOS_CONN_CLIENT
;
rpcInit
.
connType
=
TAOS_CONN_CLIENT
;
rpcInit
.
idleTime
=
tsShellActivityTimer
*
1000
;
rpcInit
.
idleTime
=
tsShellActivityTimer
*
1000
;
rpcInit
.
compressSize
=
tsCompressMsgSize
;
rpcInit
.
user
=
"_dnd"
;
rpcInit
.
user
=
"_dnd"
;
clientRpc
=
rpcOpen
(
&
rpcInit
);
clientRpc
=
rpcOpen
(
&
rpcInit
);
...
...
source/dnode/mgmt/node_mgmt/src/dmTransport.c
浏览文件 @
37a0b9c7
...
@@ -277,6 +277,7 @@ int32_t dmInitClient(SDnode *pDnode) {
...
@@ -277,6 +277,7 @@ int32_t dmInitClient(SDnode *pDnode) {
rpcInit
.
idleTime
=
tsShellActivityTimer
*
1000
;
rpcInit
.
idleTime
=
tsShellActivityTimer
*
1000
;
rpcInit
.
parent
=
pDnode
;
rpcInit
.
parent
=
pDnode
;
rpcInit
.
rfp
=
rpcRfp
;
rpcInit
.
rfp
=
rpcRfp
;
rpcInit
.
compressSize
=
tsCompressMsgSize
;
pTrans
->
clientRpc
=
rpcOpen
(
&
rpcInit
);
pTrans
->
clientRpc
=
rpcOpen
(
&
rpcInit
);
if
(
pTrans
->
clientRpc
==
NULL
)
{
if
(
pTrans
->
clientRpc
==
NULL
)
{
...
...
source/libs/function/src/udfd.c
浏览文件 @
37a0b9c7
...
@@ -657,7 +657,8 @@ int32_t udfdOpenClientRpc() {
...
@@ -657,7 +657,8 @@ int32_t udfdOpenClientRpc() {
rpcInit
.
user
=
TSDB_DEFAULT_USER
;
rpcInit
.
user
=
TSDB_DEFAULT_USER
;
rpcInit
.
parent
=
&
global
;
rpcInit
.
parent
=
&
global
;
rpcInit
.
rfp
=
udfdRpcRfp
;
rpcInit
.
rfp
=
udfdRpcRfp
;
rpcInit
.
compressSize
=
tsCompressMsgSize
;
global
.
clientRpc
=
rpcOpen
(
&
rpcInit
);
global
.
clientRpc
=
rpcOpen
(
&
rpcInit
);
if
(
global
.
clientRpc
==
NULL
)
{
if
(
global
.
clientRpc
==
NULL
)
{
fnError
(
"failed to init dnode rpc client"
);
fnError
(
"failed to init dnode rpc client"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录