Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
599bcb39
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看板
未验证
提交
599bcb39
编写于
9月 13, 2021
作者:
D
dapan1121
提交者:
GitHub
9月 13, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #7877 from taosdata/fix/TD-6416-master
[TD-6416]<fix>: fixed memory leak and crash bug
上级
74edbc14
70eb6d64
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
15 addition
and
9 deletion
+15
-9
src/client/src/tscAsync.c
src/client/src/tscAsync.c
+7
-1
src/plugins/http/src/httpHandle.c
src/plugins/http/src/httpHandle.c
+1
-0
src/plugins/http/src/httpParser.c
src/plugins/http/src/httpParser.c
+0
-4
src/plugins/http/src/httpResp.c
src/plugins/http/src/httpResp.c
+2
-0
src/plugins/http/src/httpServer.c
src/plugins/http/src/httpServer.c
+5
-3
src/plugins/http/src/httpSql.c
src/plugins/http/src/httpSql.c
+0
-1
未找到文件。
src/client/src/tscAsync.c
浏览文件 @
599bcb39
...
...
@@ -61,17 +61,23 @@ void doAsyncQuery(STscObj* pObj, SSqlObj* pSql, __async_cb_func_t fp, void* para
tscDebugL
(
"0x%"
PRIx64
" SQL: %s"
,
pSql
->
self
,
pSql
->
sqlstr
);
pCmd
->
resColumnId
=
TSDB_RES_COL_ID
;
taosAcquireRef
(
tscObjRef
,
pSql
->
self
);
int32_t
code
=
tsParseSql
(
pSql
,
true
);
if
(
code
==
TSDB_CODE_TSC_ACTION_IN_PROGRESS
)
return
;
if
(
code
==
TSDB_CODE_TSC_ACTION_IN_PROGRESS
)
{
taosReleaseRef
(
tscObjRef
,
pSql
->
self
);
return
;
}
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
pSql
->
res
.
code
=
code
;
tscAsyncResultOnError
(
pSql
);
taosReleaseRef
(
tscObjRef
,
pSql
->
self
);
return
;
}
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfo
(
pCmd
);
executeQuery
(
pSql
,
pQueryInfo
);
taosReleaseRef
(
tscObjRef
,
pSql
->
self
);
}
// TODO return the correct error code to client in tscQueueAsyncError
...
...
src/plugins/http/src/httpHandle.c
浏览文件 @
599bcb39
...
...
@@ -35,6 +35,7 @@ bool httpProcessData(HttpContext* pContext) {
if
(
!
httpAlterContextState
(
pContext
,
HTTP_CONTEXT_STATE_READY
,
HTTP_CONTEXT_STATE_HANDLING
))
{
httpTrace
(
"context:%p, fd:%d, state:%s not in ready state, stop process request"
,
pContext
,
pContext
->
fd
,
httpContextStateStr
(
pContext
->
state
));
pContext
->
error
=
true
;
httpCloseContextByApp
(
pContext
);
return
false
;
}
...
...
src/plugins/http/src/httpParser.c
浏览文件 @
599bcb39
...
...
@@ -1157,10 +1157,6 @@ static int32_t httpParseChar(HttpParser *parser, const char c, int32_t *again) {
httpOnError
(
parser
,
HTTP_CODE_INTERNAL_SERVER_ERROR
,
TSDB_CODE_HTTP_PARSE_ERROR_STATE
);
}
if
(
ok
!=
0
)
{
pContext
->
error
=
true
;
}
return
ok
;
}
...
...
src/plugins/http/src/httpResp.c
浏览文件 @
599bcb39
...
...
@@ -147,6 +147,8 @@ void httpSendErrorResp(HttpContext *pContext, int32_t errNo) {
httpCode
=
pContext
->
parser
->
httpCode
;
}
pContext
->
error
=
true
;
char
*
httpCodeStr
=
httpGetStatusDesc
(
httpCode
);
httpSendErrorRespImp
(
pContext
,
httpCode
,
httpCodeStr
,
errNo
&
0XFFFF
,
tstrerror
(
errNo
));
}
...
...
src/plugins/http/src/httpServer.c
浏览文件 @
599bcb39
...
...
@@ -191,8 +191,6 @@ static void httpProcessHttpData(void *param) {
if
(
httpReadData
(
pContext
))
{
(
*
(
pThread
->
processData
))(
pContext
);
atomic_fetch_add_32
(
&
pServer
->
requestNum
,
1
);
}
else
{
httpReleaseContext
(
pContext
/*, false*/
);
}
}
}
...
...
@@ -402,13 +400,17 @@ static bool httpReadData(HttpContext *pContext) {
}
else
if
(
nread
<
0
)
{
if
(
errno
==
EINTR
||
errno
==
EAGAIN
||
errno
==
EWOULDBLOCK
)
{
httpDebug
(
"context:%p, fd:%d, read from socket error:%d, wait another event"
,
pContext
,
pContext
->
fd
,
errno
);
return
fals
e
;
// later again
continu
e
;
// later again
}
else
{
httpError
(
"context:%p, fd:%d, read from socket error:%d, close connect"
,
pContext
,
pContext
->
fd
,
errno
);
taosCloseSocket
(
pContext
->
fd
);
httpReleaseContext
(
pContext
/*, false */
);
return
false
;
}
}
else
{
httpError
(
"context:%p, fd:%d, nread:%d, wait another event"
,
pContext
,
pContext
->
fd
,
nread
);
taosCloseSocket
(
pContext
->
fd
);
httpReleaseContext
(
pContext
/*, false */
);
return
false
;
}
}
...
...
src/plugins/http/src/httpSql.c
浏览文件 @
599bcb39
...
...
@@ -405,7 +405,6 @@ void httpProcessRequestCb(void *param, TAOS_RES *result, int32_t code) {
if
(
pContext
->
session
==
NULL
)
{
httpSendErrorResp
(
pContext
,
TSDB_CODE_HTTP_SESSION_FULL
);
httpCloseContextByApp
(
pContext
);
}
else
{
httpExecCmd
(
pContext
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录