Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
4b842885
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看板
提交
4b842885
编写于
7月 14, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-825] adjust callback sequence in async query
上级
045129ed
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
12 addition
and
10 deletion
+12
-10
src/client/src/tscAsync.c
src/client/src/tscAsync.c
+4
-4
src/plugins/http/src/httpContext.c
src/plugins/http/src/httpContext.c
+1
-1
src/plugins/http/src/httpSql.c
src/plugins/http/src/httpSql.c
+3
-3
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+2
-1
src/vnode/src/vnodeRead.c
src/vnode/src/vnodeRead.c
+2
-1
未找到文件。
src/client/src/tscAsync.c
浏览文件 @
4b842885
...
@@ -198,6 +198,10 @@ void taos_fetch_rows_a(TAOS_RES *taosa, void (*fp)(void *, TAOS_RES *, int), voi
...
@@ -198,6 +198,10 @@ void taos_fetch_rows_a(TAOS_RES *taosa, void (*fp)(void *, TAOS_RES *, int), voi
SSqlRes
*
pRes
=
&
pSql
->
res
;
SSqlRes
*
pRes
=
&
pSql
->
res
;
SSqlCmd
*
pCmd
=
&
pSql
->
cmd
;
SSqlCmd
*
pCmd
=
&
pSql
->
cmd
;
// user-defined callback function is stored in fetchFp
pSql
->
fetchFp
=
fp
;
pSql
->
fp
=
tscAsyncFetchRowsProxy
;
if
(
pRes
->
qhandle
==
0
)
{
if
(
pRes
->
qhandle
==
0
)
{
tscError
(
"qhandle is NULL"
);
tscError
(
"qhandle is NULL"
);
pRes
->
code
=
TSDB_CODE_TSC_INVALID_QHANDLE
;
pRes
->
code
=
TSDB_CODE_TSC_INVALID_QHANDLE
;
...
@@ -205,10 +209,6 @@ void taos_fetch_rows_a(TAOS_RES *taosa, void (*fp)(void *, TAOS_RES *, int), voi
...
@@ -205,10 +209,6 @@ void taos_fetch_rows_a(TAOS_RES *taosa, void (*fp)(void *, TAOS_RES *, int), voi
return
;
return
;
}
}
// user-defined callback function is stored in fetchFp
pSql
->
fetchFp
=
fp
;
pSql
->
fp
=
tscAsyncFetchRowsProxy
;
pSql
->
param
=
param
;
pSql
->
param
=
param
;
tscResetForNextRetrieve
(
pRes
);
tscResetForNextRetrieve
(
pRes
);
...
...
src/plugins/http/src/httpContext.c
浏览文件 @
4b842885
...
@@ -137,7 +137,7 @@ void httpReleaseContext(HttpContext *pContext) {
...
@@ -137,7 +137,7 @@ void httpReleaseContext(HttpContext *pContext) {
assert
(
refCount
>=
0
);
assert
(
refCount
>=
0
);
HttpContext
**
ppContext
=
pContext
->
ppContext
;
HttpContext
**
ppContext
=
pContext
->
ppContext
;
httpDebug
(
"context:%p, is releasd, data:%p refCount:%d"
,
pContext
,
ppContext
,
refCount
);
httpDebug
(
"context:%p, is releas
e
d, data:%p refCount:%d"
,
pContext
,
ppContext
,
refCount
);
if
(
tsHttpServer
.
contextCache
!=
NULL
)
{
if
(
tsHttpServer
.
contextCache
!=
NULL
)
{
taosCacheRelease
(
tsHttpServer
.
contextCache
,
(
void
**
)(
&
ppContext
),
false
);
taosCacheRelease
(
tsHttpServer
.
contextCache
,
(
void
**
)(
&
ppContext
),
false
);
...
...
src/plugins/http/src/httpSql.c
浏览文件 @
4b842885
...
@@ -226,9 +226,9 @@ void httpProcessSingleSqlRetrieveCallBack(void *param, TAOS_RES *result, int num
...
@@ -226,9 +226,9 @@ void httpProcessSingleSqlRetrieveCallBack(void *param, TAOS_RES *result, int num
if
(
numOfRows
<
0
)
{
if
(
numOfRows
<
0
)
{
httpError
(
"context:%p, fd:%d, ip:%s, user:%s, retrieve failed, code:%s"
,
pContext
,
pContext
->
fd
,
pContext
->
ipstr
,
httpError
(
"context:%p, fd:%d, ip:%s, user:%s, retrieve failed, code:%s"
,
pContext
,
pContext
->
fd
,
pContext
->
ipstr
,
pContext
->
user
,
tstrerror
(
numOfRows
));
pContext
->
user
,
tstrerror
(
numOfRows
));
}
}
taos_free_result
(
result
);
taos_free_result
(
result
);
if
(
encode
->
stopJsonFp
)
{
if
(
encode
->
stopJsonFp
)
{
(
encode
->
stopJsonFp
)(
pContext
,
&
pContext
->
singleCmd
);
(
encode
->
stopJsonFp
)(
pContext
,
&
pContext
->
singleCmd
);
...
...
src/query/src/qExecutor.c
浏览文件 @
4b842885
...
@@ -6545,13 +6545,14 @@ void** qRegisterQInfo(void* pMgmt, uint64_t qInfo) {
...
@@ -6545,13 +6545,14 @@ void** qRegisterQInfo(void* pMgmt, uint64_t qInfo) {
SQueryMgmt
*
pQueryMgmt
=
pMgmt
;
SQueryMgmt
*
pQueryMgmt
=
pMgmt
;
if
(
pQueryMgmt
->
qinfoPool
==
NULL
)
{
if
(
pQueryMgmt
->
qinfoPool
==
NULL
)
{
qError
(
"QInfo:%p failed to add qhandle into qMgmt, since qMgmt is closed"
,
(
void
*
)
qInfo
);
return
NULL
;
return
NULL
;
}
}
pthread_mutex_lock
(
&
pQueryMgmt
->
lock
);
pthread_mutex_lock
(
&
pQueryMgmt
->
lock
);
if
(
pQueryMgmt
->
closed
)
{
if
(
pQueryMgmt
->
closed
)
{
pthread_mutex_unlock
(
&
pQueryMgmt
->
lock
);
pthread_mutex_unlock
(
&
pQueryMgmt
->
lock
);
qError
(
"QInfo:%p failed to add qhandle into cache, since qMgmt is colsing"
,
(
void
*
)
qInfo
);
return
NULL
;
return
NULL
;
}
else
{
}
else
{
uint64_t
handleVal
=
(
uint64_t
)
qInfo
;
uint64_t
handleVal
=
(
uint64_t
)
qInfo
;
...
...
src/vnode/src/vnodeRead.c
浏览文件 @
4b842885
...
@@ -108,9 +108,10 @@ static int32_t vnodeProcessQueryMsg(SVnodeObj *pVnode, SReadMsg *pReadMsg) {
...
@@ -108,9 +108,10 @@ static int32_t vnodeProcessQueryMsg(SVnodeObj *pVnode, SReadMsg *pReadMsg) {
if
(
code
==
TSDB_CODE_SUCCESS
)
{
if
(
code
==
TSDB_CODE_SUCCESS
)
{
handle
=
qRegisterQInfo
(
pVnode
->
qMgmt
,
(
uint64_t
)
pQInfo
);
handle
=
qRegisterQInfo
(
pVnode
->
qMgmt
,
(
uint64_t
)
pQInfo
);
if
(
handle
==
NULL
)
{
// failed to register qhandle
if
(
handle
==
NULL
)
{
// failed to register qhandle
vError
(
"vgId:%d QInfo:%p register qhandle failed, return to app, code:%s"
,
pVnode
->
vgId
,
(
void
*
)
pQInfo
,
tstrerror
(
pRsp
->
code
));
pRsp
->
code
=
TSDB_CODE_QRY_INVALID_QHANDLE
;
pRsp
->
code
=
TSDB_CODE_QRY_INVALID_QHANDLE
;
qDestroyQueryInfo
(
pQInfo
);
// destroy it directly
qDestroyQueryInfo
(
pQInfo
);
// destroy it directly
vError
(
"vgId:%d QInfo:%p register qhandle failed, return to app, code:%s"
,
pVnode
->
vgId
,
(
void
*
)
pQInfo
,
tstrerror
(
pRsp
->
code
));
}
else
{
}
else
{
assert
(
*
handle
==
pQInfo
);
assert
(
*
handle
==
pQInfo
);
pRsp
->
qhandle
=
htobe64
((
uint64_t
)
pQInfo
);
pRsp
->
qhandle
=
htobe64
((
uint64_t
)
pQInfo
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录