Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
58a0ea25
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看板
未验证
提交
58a0ea25
编写于
11月 27, 2022
作者:
guanshengliang
提交者:
GitHub
11月 27, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "enh: add debug info"
上级
a649027f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
13 addition
and
68 deletion
+13
-68
include/os/osSocket.h
include/os/osSocket.h
+0
-2
source/libs/transport/inc/transComm.h
source/libs/transport/inc/transComm.h
+8
-9
source/libs/transport/src/transCli.c
source/libs/transport/src/transCli.c
+0
-10
source/libs/transport/src/transSvr.c
source/libs/transport/src/transSvr.c
+5
-19
source/os/src/osSocket.c
source/os/src/osSocket.c
+0
-28
未找到文件。
include/os/osSocket.h
浏览文件 @
58a0ea25
...
@@ -169,8 +169,6 @@ void taosSetMaskSIGPIPE();
...
@@ -169,8 +169,6 @@ void taosSetMaskSIGPIPE();
uint32_t
taosInetAddr
(
const
char
*
ipAddr
);
uint32_t
taosInetAddr
(
const
char
*
ipAddr
);
const
char
*
taosInetNtoa
(
struct
in_addr
ipInt
,
char
*
dstStr
,
int32_t
len
);
const
char
*
taosInetNtoa
(
struct
in_addr
ipInt
,
char
*
dstStr
,
int32_t
len
);
uint64_t
taosHton64
(
uint64_t
val
);
uint64_t
taosNtoh64
(
uint64_t
val
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
...
source/libs/transport/inc/transComm.h
浏览文件 @
58a0ea25
...
@@ -152,15 +152,14 @@ typedef struct {
...
@@ -152,15 +152,14 @@ typedef struct {
#pragma pack(push, 1)
#pragma pack(push, 1)
typedef
struct
{
typedef
struct
{
char
version
:
4
;
// RPC version
char
version
:
4
;
// RPC version
char
comp
:
2
;
// compression algorithm, 0:no compression 1:lz4
char
comp
:
2
;
// compression algorithm, 0:no compression 1:lz4
char
noResp
:
2
;
// noResp bits, 0: resp, 1: resp
char
noResp
:
2
;
// noResp bits, 0: resp, 1: resp
char
persist
:
2
;
// persist handle,0: no persit, 1: persist handle
char
persist
:
2
;
// persist handle,0: no persit, 1: persist handle
char
release
:
2
;
char
release
:
2
;
char
secured
:
2
;
char
secured
:
2
;
char
spi
:
2
;
char
spi
:
2
;
char
hasEpSet
:
2
;
// contain epset or not, 0(default): no epset, 1: contain epset
char
hasEpSet
:
2
;
// contain epset or not, 0(default): no epset, 1: contain epset
uint64_t
timestamp
;
char
user
[
TSDB_UNI_LEN
];
char
user
[
TSDB_UNI_LEN
];
uint32_t
magicNum
;
uint32_t
magicNum
;
...
...
source/libs/transport/src/transCli.c
浏览文件 @
58a0ea25
...
@@ -757,14 +757,6 @@ static void cliSendCb(uv_write_t* req, int status) {
...
@@ -757,14 +757,6 @@ static void cliSendCb(uv_write_t* req, int status) {
SCliConn
*
pConn
=
transReqQueueRemove
(
req
);
SCliConn
*
pConn
=
transReqQueueRemove
(
req
);
if
(
pConn
==
NULL
)
return
;
if
(
pConn
==
NULL
)
return
;
SCliMsg
*
pMsg
=
!
transQueueEmpty
(
&
pConn
->
cliMsgs
)
?
transQueueGet
(
&
pConn
->
cliMsgs
,
0
)
:
NULL
;
if
(
pMsg
!=
NULL
)
{
int64_t
cost
=
taosGetTimestampUs
()
-
pMsg
->
st
;
if
(
cost
>
1000
)
{
tWarn
(
"%s conn %p send exception, cost:%dus"
,
CONN_GET_INST_LABEL
(
pConn
),
pConn
,
(
int
)
cost
);
}
}
if
(
status
==
0
)
{
if
(
status
==
0
)
{
tTrace
(
"%s conn %p data already was written out"
,
CONN_GET_INST_LABEL
(
pConn
),
pConn
);
tTrace
(
"%s conn %p data already was written out"
,
CONN_GET_INST_LABEL
(
pConn
),
pConn
);
}
else
{
}
else
{
...
@@ -813,7 +805,6 @@ void cliSend(SCliConn* pConn) {
...
@@ -813,7 +805,6 @@ void cliSend(SCliConn* pConn) {
pHead
->
traceId
=
pMsg
->
info
.
traceId
;
pHead
->
traceId
=
pMsg
->
info
.
traceId
;
pHead
->
magicNum
=
htonl
(
TRANS_MAGIC_NUM
);
pHead
->
magicNum
=
htonl
(
TRANS_MAGIC_NUM
);
}
}
pHead
->
timestamp
=
taosHton64
(
taosGetTimestampUs
());
if
(
pHead
->
persist
==
1
)
{
if
(
pHead
->
persist
==
1
)
{
CONN_SET_PERSIST_BY_APP
(
pConn
);
CONN_SET_PERSIST_BY_APP
(
pConn
);
...
@@ -1576,7 +1567,6 @@ int transReleaseCliHandle(void* handle) {
...
@@ -1576,7 +1567,6 @@ int transReleaseCliHandle(void* handle) {
SCliMsg
*
cmsg
=
taosMemoryCalloc
(
1
,
sizeof
(
SCliMsg
));
SCliMsg
*
cmsg
=
taosMemoryCalloc
(
1
,
sizeof
(
SCliMsg
));
cmsg
->
msg
=
tmsg
;
cmsg
->
msg
=
tmsg
;
cmsg
->
st
=
taosGetTimestampUs
();
cmsg
->
type
=
Release
;
cmsg
->
type
=
Release
;
cmsg
->
ctx
=
pCtx
;
cmsg
->
ctx
=
pCtx
;
...
...
source/libs/transport/src/transSvr.c
浏览文件 @
58a0ea25
...
@@ -231,28 +231,14 @@ static bool uvHandleReq(SSvrConn* pConn) {
...
@@ -231,28 +231,14 @@ static bool uvHandleReq(SSvrConn* pConn) {
}
}
}
}
STraceId
*
trace
=
&
pHead
->
traceId
;
STraceId
*
trace
=
&
pHead
->
traceId
;
int64_t
cost
=
taosGetTimestampUs
()
-
taosNtoh64
(
pHead
->
timestamp
);
static
int64_t
EXCEPTION_LIMIT_US
=
100
*
1000
;
if
(
pConn
->
status
==
ConnNormal
&&
pHead
->
noResp
==
0
)
{
if
(
pConn
->
status
==
ConnNormal
&&
pHead
->
noResp
==
0
)
{
transRefSrvHandle
(
pConn
);
transRefSrvHandle
(
pConn
);
if
(
cost
>
EXCEPTION_LIMIT_US
)
{
tGWarn
(
"%s conn %p %s received from %s, local info:%s, len:%d, cost:%dus, recv exception"
,
transLabel
(
pTransInst
),
tGDebug
(
"%s conn %p %s received from %s, local info:%s, len:%d"
,
transLabel
(
pTransInst
),
pConn
,
pConn
,
TMSG_INFO
(
transMsg
.
msgType
),
pConn
->
dst
,
pConn
->
src
,
msgLen
,
(
int
)
cost
);
TMSG_INFO
(
transMsg
.
msgType
),
pConn
->
dst
,
pConn
->
src
,
msgLen
);
}
else
{
tGDebug
(
"%s conn %p %s received from %s, local info:%s, len:%d, cost:%dus"
,
transLabel
(
pTransInst
),
pConn
,
TMSG_INFO
(
transMsg
.
msgType
),
pConn
->
dst
,
pConn
->
src
,
msgLen
,
(
int
)
cost
);
}
}
else
{
}
else
{
if
(
cost
>
EXCEPTION_LIMIT_US
)
{
tGDebug
(
"%s conn %p %s received from %s, local info:%s, len:%d, resp:%d, code:%d"
,
transLabel
(
pTransInst
),
pConn
,
tGWarn
(
"%s conn %p %s received from %s, local info:%s, len:%d, resp:%d, code:%d, cost:%dus, recv exception"
,
TMSG_INFO
(
transMsg
.
msgType
),
pConn
->
dst
,
pConn
->
src
,
msgLen
,
pHead
->
noResp
,
transMsg
.
code
);
transLabel
(
pTransInst
),
pConn
,
TMSG_INFO
(
transMsg
.
msgType
),
pConn
->
dst
,
pConn
->
src
,
msgLen
,
pHead
->
noResp
,
transMsg
.
code
,
(
int
)
cost
);
}
else
{
tGDebug
(
"%s conn %p %s received from %s, local info:%s, len:%d, resp:%d, code:%d, cost:%dus"
,
transLabel
(
pTransInst
),
pConn
,
TMSG_INFO
(
transMsg
.
msgType
),
pConn
->
dst
,
pConn
->
src
,
msgLen
,
pHead
->
noResp
,
transMsg
.
code
,
(
int
)
cost
);
}
}
}
// pHead->noResp = 1,
// pHead->noResp = 1,
...
...
source/os/src/osSocket.c
浏览文件 @
58a0ea25
...
@@ -1101,33 +1101,5 @@ void taosWinSocketInit() {
...
@@ -1101,33 +1101,5 @@ void taosWinSocketInit() {
}
}
}
}
#else
#else
#endif
}
uint64_t
taosHton64
(
uint64_t
val
)
{
#if defined(WINDOWS) || defined(DARWIN)
return
((
val
&
0x00000000000000ff
)
<<
7
*
8
)
|
((
val
&
0x000000000000ff00
)
<<
5
*
8
)
|
((
val
&
0x0000000000ff0000
)
<<
3
*
8
)
|
((
val
&
0x00000000ff000000
)
<<
1
*
8
)
|
((
val
&
0x000000ff00000000
)
>>
1
*
8
)
|
((
val
&
0x0000ff0000000000
)
>>
3
*
8
)
|
((
val
&
0x00ff000000000000
)
>>
5
*
8
)
|
((
val
&
0xff00000000000000
)
>>
7
*
8
);
#else
if
(
__BYTE_ORDER
==
__LITTLE_ENDIAN
)
{
return
(((
uint64_t
)
htonl
((
int
)((
val
<<
32
)
>>
32
)))
<<
32
)
|
(
unsigned
int
)
htonl
((
int
)(
val
>>
32
));
}
else
if
(
__BYTE_ORDER
==
__BIG_ENDIAN
)
{
return
val
;
}
#endif
}
uint64_t
taosNtoh64
(
uint64_t
val
)
{
#if defined(WINDOWS) || defined(DARWIN)
return
taosHton64
(
val
);
#else
if
(
__BYTE_ORDER
==
__LITTLE_ENDIAN
)
{
return
(((
uint64_t
)
htonl
((
int
)((
val
<<
32
)
>>
32
)))
<<
32
)
|
(
unsigned
int
)
htonl
((
int
)(
val
>>
32
));
}
else
if
(
__BYTE_ORDER
==
__BIG_ENDIAN
)
{
return
val
;
}
#endif
#endif
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录