Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
7546cd7c
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看板
提交
7546cd7c
编写于
9月 14, 2022
作者:
B
Benguang Zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enh: tsem_init rspSem of SSqlObj in tscAllocSqlObj instead
上级
a170194c
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
4 addition
and
25 deletion
+4
-25
src/client/src/tscDelete.c
src/client/src/tscDelete.c
+0
-1
src/client/src/tscParseLineProtocol.c
src/client/src/tscParseLineProtocol.c
+0
-1
src/client/src/tscPrepare.c
src/client/src/tscPrepare.c
+0
-1
src/client/src/tscSql.c
src/client/src/tscSql.c
+0
-7
src/client/src/tscStream.c
src/client/src/tscStream.c
+0
-1
src/client/src/tscSub.c
src/client/src/tscSub.c
+0
-9
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+4
-5
未找到文件。
src/client/src/tscDelete.c
浏览文件 @
7546cd7c
...
...
@@ -153,7 +153,6 @@ SSqlObj *tscCreateSTableSubDelete(SSqlObj *pSql, SVgroupMsg* pVgroupMsg, SRetrie
// update vgroup id
writeMsgVgId
(
pNewCmd
->
payload
,
pVgroupMsg
->
vgId
);
tsem_init
(
&
pNew
->
rspSem
,
0
,
0
);
registerSqlObj
(
pNew
);
tscDebug
(
"0x%"
PRIx64
":CDEL new sub insertion: %p"
,
pSql
->
self
,
pNew
);
...
...
src/client/src/tscParseLineProtocol.c
浏览文件 @
7546cd7c
...
...
@@ -2771,7 +2771,6 @@ static SSqlObj* createSmlQueryObj(TAOS* taos, int32_t affected_rows, int32_t cod
pNew
->
pTscObj
=
taos
;
pNew
->
fp
=
NULL
;
tsem_init
(
&
pNew
->
rspSem
,
0
,
0
);
registerSqlObj
(
pNew
);
pNew
->
res
.
numOfRows
=
affected_rows
;
...
...
src/client/src/tscPrepare.c
浏览文件 @
7546cd7c
...
...
@@ -1604,7 +1604,6 @@ TAOS_STMT* taos_stmt_init(TAOS* taos) {
return
NULL
;
}
tsem_init
(
&
pSql
->
rspSem
,
0
,
0
);
pSql
->
signature
=
pSql
;
pSql
->
pTscObj
=
pObj
;
pSql
->
maxRetry
=
TSDB_MAX_REPLICA
;
...
...
src/client/src/tscSql.c
浏览文件 @
7546cd7c
...
...
@@ -164,8 +164,6 @@ static SSqlObj *taosConnectImpl(const char *ip, const char *user, const char *pa
pSql
->
param
=
param
;
pSql
->
cmd
.
command
=
TSDB_SQL_CONNECT
;
tsem_init
(
&
pSql
->
rspSem
,
0
,
0
);
if
(
TSDB_CODE_SUCCESS
!=
tscAllocPayload
(
&
pSql
->
cmd
,
TSDB_DEFAULT_PAYLOAD_SIZE
))
{
terrno
=
TSDB_CODE_TSC_OUT_OF_MEMORY
;
tscReleaseRpc
(
pRpcObj
);
...
...
@@ -305,10 +303,6 @@ void taos_close(TAOS *taos) {
tscDebug
(
"0x%"
PRIx64
" HB is freed"
,
pHb
->
self
);
taosReleaseRef
(
tscObjRef
,
pHb
->
self
);
#ifdef __APPLE__
// to satisfy later tsem_destroy in taos_free_result
tsem_init
(
&
pHb
->
rspSem
,
0
,
0
);
#endif // __APPLE__
taos_free_result
(
pHb
);
}
}
...
...
@@ -370,7 +364,6 @@ TAOS_RES* taos_query_c(TAOS *taos, const char *sqlstr, uint32_t sqlLen, int64_t*
return
NULL
;
}
tsem_init
(
&
pSql
->
rspSem
,
0
,
0
);
doAsyncQuery
(
pObj
,
pSql
,
waitForQueryRsp
,
taos
,
sqlstr
,
sqlLen
);
if
(
res
!=
NULL
)
{
...
...
src/client/src/tscStream.c
浏览文件 @
7546cd7c
...
...
@@ -1054,7 +1054,6 @@ TAOS_STREAM *taos_open_stream_withname(TAOS *taos, const char* dstTable, int32_t
pSql
->
fetchFp
=
tscCreateStream
;
pSql
->
cmd
.
resColumnId
=
TSDB_RES_COL_ID
;
tsem_init
(
&
pSql
->
rspSem
,
0
,
0
);
registerSqlObj
(
pSql
);
tscDebugL
(
"0x%"
PRIx64
" SQL: %s"
,
pSql
->
self
,
pSql
->
sqlstr
);
...
...
src/client/src/tscSub.c
浏览文件 @
7546cd7c
...
...
@@ -132,11 +132,6 @@ static SSub* tscCreateSubscription(STscObj* pObj, const char* topic, const char*
SSqlCmd
*
pCmd
=
&
pSql
->
cmd
;
SSqlRes
*
pRes
=
&
pSql
->
res
;
if
(
tsem_init
(
&
pSql
->
rspSem
,
0
,
0
)
==
-
1
)
{
line
=
__LINE__
;
code
=
TAOS_SYSTEM_ERROR
(
errno
);
goto
fail
;
}
pSql
->
param
=
pSub
;
pSql
->
maxRetry
=
TSDB_MAX_REPLICA
;
...
...
@@ -442,10 +437,6 @@ SSqlObj* recreateSqlObj(SSub* pSub) {
SSqlCmd
*
pCmd
=
&
pSql
->
cmd
;
SSqlRes
*
pRes
=
&
pSql
->
res
;
if
(
tsem_init
(
&
pSql
->
rspSem
,
0
,
0
)
==
-
1
)
{
tscFreeSqlObj
(
pSql
);
return
NULL
;
}
pSql
->
param
=
pSub
;
pSql
->
maxRetry
=
TSDB_MAX_REPLICA
;
...
...
src/client/src/tscUtil.c
浏览文件 @
7546cd7c
...
...
@@ -1743,7 +1743,10 @@ SSqlObj* tscAllocSqlObj() {
if
(
!
pNew
)
{
return
NULL
;
}
pthread_mutex_init
(
&
pNew
->
subState
.
mutex
,
NULL
);
int
rc
=
tsem_init
(
&
pNew
->
rspSem
,
0
,
0
);
assert
(
rc
==
0
&&
"tsem_init failure"
);
rc
=
pthread_mutex_init
(
&
pNew
->
subState
.
mutex
,
NULL
);
assert
(
rc
==
0
&&
"pthread_mutex_init failure"
);
return
pNew
;
}
...
...
@@ -3798,7 +3801,6 @@ SSqlObj* createSimpleSubObj(SSqlObj* pSql, __async_cb_func_t fp, void* param, in
SSqlCmd
*
pCmd
=
&
pNew
->
cmd
;
pCmd
->
command
=
cmd
;
tsem_init
(
&
pNew
->
rspSem
,
0
,
0
);
if
(
tscAddQueryInfo
(
pCmd
)
!=
TSDB_CODE_SUCCESS
)
{
tscFreeSqlObj
(
pNew
);
...
...
@@ -3877,7 +3879,6 @@ SSqlObj* createSubqueryObj(SSqlObj* pSql, int16_t tableIndex, __async_cb_func_t
pNew
->
signature
=
pNew
;
pNew
->
sqlstr
=
strdup
(
pSql
->
sqlstr
);
pNew
->
rootObj
=
pSql
->
rootObj
;
tsem_init
(
&
pNew
->
rspSem
,
0
,
0
);
SSqlCmd
*
pnCmd
=
&
pNew
->
cmd
;
memcpy
(
pnCmd
,
pCmd
,
sizeof
(
SSqlCmd
));
...
...
@@ -4281,8 +4282,6 @@ void executeQuery(SSqlObj* pSql, SQueryInfo* pQueryInfo) {
pNew
->
cmd
.
resColumnId
=
TSDB_RES_COL_ID
;
tsem_init
(
&
pNew
->
rspSem
,
0
,
0
);
SRetrieveSupport
*
ps
=
calloc
(
1
,
sizeof
(
SRetrieveSupport
));
// todo use object id
if
(
ps
==
NULL
)
{
tscFreeSqlObj
(
pNew
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录