Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yiicenne
TDengine
提交
52e92cd3
TDengine
项目概览
yiicenne
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
52e92cd3
编写于
9月 12, 2021
作者:
X
xywang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-6416]<fix>: fixed memory leak and crash bug
上级
e9e5dc22
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
17 addition
and
9 deletion
+17
-9
src/client/src/tscAsync.c
src/client/src/tscAsync.c
+9
-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
浏览文件 @
52e92cd3
...
...
@@ -60,17 +60,25 @@ 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
浏览文件 @
52e92cd3
...
...
@@ -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
浏览文件 @
52e92cd3
...
...
@@ -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
浏览文件 @
52e92cd3
...
...
@@ -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
浏览文件 @
52e92cd3
...
...
@@ -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
浏览文件 @
52e92cd3
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录