Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
1f7821e6
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1f7821e6
编写于
9月 22, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '3.0' into feature/3_liaohj
上级
092805b4
75aea259
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
12 addition
and
14 deletion
+12
-14
source/client/inc/clientInt.h
source/client/inc/clientInt.h
+4
-3
source/client/src/clientEnv.c
source/client/src/clientEnv.c
+1
-0
source/client/src/clientMain.c
source/client/src/clientMain.c
+6
-10
source/libs/executor/src/timewindowoperator.c
source/libs/executor/src/timewindowoperator.c
+1
-1
未找到文件。
source/client/inc/clientInt.h
浏览文件 @
1f7821e6
...
@@ -59,9 +59,9 @@ enum {
...
@@ -59,9 +59,9 @@ enum {
#define SHOW_VARIABLES_RESULT_FIELD1_LEN (TSDB_CONFIG_OPTION_LEN + VARSTR_HEADER_SIZE)
#define SHOW_VARIABLES_RESULT_FIELD1_LEN (TSDB_CONFIG_OPTION_LEN + VARSTR_HEADER_SIZE)
#define SHOW_VARIABLES_RESULT_FIELD2_LEN (TSDB_CONFIG_VALUE_LEN + VARSTR_HEADER_SIZE)
#define SHOW_VARIABLES_RESULT_FIELD2_LEN (TSDB_CONFIG_VALUE_LEN + VARSTR_HEADER_SIZE)
#define TD_RES_QUERY(res) (*(int8_t*)res == RES_TYPE__QUERY)
#define TD_RES_QUERY(res)
(*(int8_t*)res == RES_TYPE__QUERY)
#define TD_RES_TMQ(res) (*(int8_t*)res == RES_TYPE__TMQ)
#define TD_RES_TMQ(res)
(*(int8_t*)res == RES_TYPE__TMQ)
#define TD_RES_TMQ_META(res) (*(int8_t*)res == RES_TYPE__TMQ_META)
#define TD_RES_TMQ_META(res)
(*(int8_t*)res == RES_TYPE__TMQ_META)
#define TD_RES_TMQ_METADATA(res) (*(int8_t*)res == RES_TYPE__TMQ_METADATA)
#define TD_RES_TMQ_METADATA(res) (*(int8_t*)res == RES_TYPE__TMQ_METADATA)
typedef
struct
SAppInstInfo
SAppInstInfo
;
typedef
struct
SAppInstInfo
SAppInstInfo
;
...
@@ -251,6 +251,7 @@ typedef struct SRequestObj {
...
@@ -251,6 +251,7 @@ typedef struct SRequestObj {
uint32_t
prevCode
;
// previous error code: todo refactor, add update flag for catalog
uint32_t
prevCode
;
// previous error code: todo refactor, add update flag for catalog
uint32_t
retry
;
uint32_t
retry
;
int64_t
allocatorRefId
;
int64_t
allocatorRefId
;
SQuery
*
pQuery
;
}
SRequestObj
;
}
SRequestObj
;
typedef
struct
SSyncQueryParam
{
typedef
struct
SSyncQueryParam
{
...
...
source/client/src/clientEnv.c
浏览文件 @
1f7821e6
...
@@ -350,6 +350,7 @@ void doDestroyRequest(void *p) {
...
@@ -350,6 +350,7 @@ void doDestroyRequest(void *p) {
taosArrayDestroy
(
pRequest
->
tableList
);
taosArrayDestroy
(
pRequest
->
tableList
);
taosArrayDestroy
(
pRequest
->
dbList
);
taosArrayDestroy
(
pRequest
->
dbList
);
taosArrayDestroy
(
pRequest
->
targetTableList
);
taosArrayDestroy
(
pRequest
->
targetTableList
);
qDestroyQuery
(
pRequest
->
pQuery
);
nodesDestroyAllocator
(
pRequest
->
allocatorRefId
);
nodesDestroyAllocator
(
pRequest
->
allocatorRefId
);
destroyQueryExecRes
(
&
pRequest
->
body
.
resInfo
.
execRes
);
destroyQueryExecRes
(
&
pRequest
->
body
.
resInfo
.
execRes
);
...
...
source/client/src/clientMain.c
浏览文件 @
1f7821e6
...
@@ -670,7 +670,6 @@ typedef struct SqlParseWrapper {
...
@@ -670,7 +670,6 @@ typedef struct SqlParseWrapper {
SParseContext
*
pCtx
;
SParseContext
*
pCtx
;
SCatalogReq
catalogReq
;
SCatalogReq
catalogReq
;
SRequestObj
*
pRequest
;
SRequestObj
*
pRequest
;
SQuery
*
pQuery
;
}
SqlParseWrapper
;
}
SqlParseWrapper
;
static
void
destoryTablesReq
(
void
*
p
)
{
static
void
destoryTablesReq
(
void
*
p
)
{
...
@@ -696,8 +695,8 @@ static void destorySqlParseWrapper(SqlParseWrapper *pWrapper) {
...
@@ -696,8 +695,8 @@ static void destorySqlParseWrapper(SqlParseWrapper *pWrapper) {
void
retrieveMetaCallback
(
SMetaData
*
pResultMeta
,
void
*
param
,
int32_t
code
)
{
void
retrieveMetaCallback
(
SMetaData
*
pResultMeta
,
void
*
param
,
int32_t
code
)
{
SqlParseWrapper
*
pWrapper
=
(
SqlParseWrapper
*
)
param
;
SqlParseWrapper
*
pWrapper
=
(
SqlParseWrapper
*
)
param
;
SQuery
*
pQuery
=
pWrapper
->
pQuery
;
SRequestObj
*
pRequest
=
pWrapper
->
pRequest
;
SRequestObj
*
pRequest
=
pWrapper
->
pRequest
;
SQuery
*
pQuery
=
pRequest
->
pQuery
;
pRequest
->
metric
.
ctgEnd
=
taosGetTimestampUs
();
pRequest
->
metric
.
ctgEnd
=
taosGetTimestampUs
();
...
@@ -726,10 +725,10 @@ void retrieveMetaCallback(SMetaData *pResultMeta, void *param, int32_t code) {
...
@@ -726,10 +725,10 @@ void retrieveMetaCallback(SMetaData *pResultMeta, void *param, int32_t code) {
tscDebug
(
"0x%"
PRIx64
" analysis semantics completed, start async query, reqId:0x%"
PRIx64
,
pRequest
->
self
,
tscDebug
(
"0x%"
PRIx64
" analysis semantics completed, start async query, reqId:0x%"
PRIx64
,
pRequest
->
self
,
pRequest
->
requestId
);
pRequest
->
requestId
);
launchAsyncQuery
(
pRequest
,
pQuery
,
pResultMeta
);
launchAsyncQuery
(
pRequest
,
pQuery
,
pResultMeta
);
qDestroyQuery
(
pQuery
);
}
else
{
}
else
{
destorySqlParseWrapper
(
pWrapper
);
destorySqlParseWrapper
(
pWrapper
);
qDestroyQuery
(
pQuery
);
qDestroyQuery
(
pRequest
->
pQuery
);
pRequest
->
pQuery
=
NULL
;
if
(
NEED_CLIENT_HANDLE_ERROR
(
code
))
{
if
(
NEED_CLIENT_HANDLE_ERROR
(
code
))
{
tscDebug
(
"0x%"
PRIx64
" client retry to handle the error, code:%d - %s, tryCount:%d, reqId:0x%"
PRIx64
,
tscDebug
(
"0x%"
PRIx64
" client retry to handle the error, code:%d - %s, tryCount:%d, reqId:0x%"
PRIx64
,
pRequest
->
self
,
code
,
tstrerror
(
code
),
pRequest
->
retry
,
pRequest
->
requestId
);
pRequest
->
self
,
code
,
tstrerror
(
code
),
pRequest
->
retry
,
pRequest
->
requestId
);
...
@@ -802,12 +801,10 @@ void doAsyncQuery(SRequestObj *pRequest, bool updateMetaForce) {
...
@@ -802,12 +801,10 @@ void doAsyncQuery(SRequestObj *pRequest, bool updateMetaForce) {
goto
_error
;
goto
_error
;
}
}
SQuery
*
pQuery
=
NULL
;
pRequest
->
metric
.
syntaxStart
=
taosGetTimestampUs
();
pRequest
->
metric
.
syntaxStart
=
taosGetTimestampUs
();
SCatalogReq
catalogReq
=
{.
forceUpdate
=
updateMetaForce
,
.
qNodeRequired
=
qnodeRequired
(
pRequest
)};
SCatalogReq
catalogReq
=
{.
forceUpdate
=
updateMetaForce
,
.
qNodeRequired
=
qnodeRequired
(
pRequest
)};
code
=
qParseSqlSyntax
(
pCxt
,
&
pQuery
,
&
catalogReq
);
code
=
qParseSqlSyntax
(
pCxt
,
&
p
Request
->
p
Query
,
&
catalogReq
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
goto
_error
;
goto
_error
;
}
}
...
@@ -817,9 +814,9 @@ void doAsyncQuery(SRequestObj *pRequest, bool updateMetaForce) {
...
@@ -817,9 +814,9 @@ void doAsyncQuery(SRequestObj *pRequest, bool updateMetaForce) {
if
(
!
updateMetaForce
)
{
if
(
!
updateMetaForce
)
{
STscObj
*
pTscObj
=
pRequest
->
pTscObj
;
STscObj
*
pTscObj
=
pRequest
->
pTscObj
;
SAppClusterSummary
*
pActivity
=
&
pTscObj
->
pAppInfo
->
summary
;
SAppClusterSummary
*
pActivity
=
&
pTscObj
->
pAppInfo
->
summary
;
if
(
NULL
==
pQuery
->
pRoot
)
{
if
(
NULL
==
p
Request
->
p
Query
->
pRoot
)
{
atomic_add_fetch_64
((
int64_t
*
)
&
pActivity
->
numOfInsertsReq
,
1
);
atomic_add_fetch_64
((
int64_t
*
)
&
pActivity
->
numOfInsertsReq
,
1
);
}
else
if
(
QUERY_NODE_SELECT_STMT
==
pQuery
->
pRoot
->
type
)
{
}
else
if
(
QUERY_NODE_SELECT_STMT
==
p
Request
->
p
Query
->
pRoot
->
type
)
{
atomic_add_fetch_64
((
int64_t
*
)
&
pActivity
->
numOfQueryReq
,
1
);
atomic_add_fetch_64
((
int64_t
*
)
&
pActivity
->
numOfQueryReq
,
1
);
}
}
}
}
...
@@ -831,7 +828,6 @@ void doAsyncQuery(SRequestObj *pRequest, bool updateMetaForce) {
...
@@ -831,7 +828,6 @@ void doAsyncQuery(SRequestObj *pRequest, bool updateMetaForce) {
}
}
pWrapper
->
pCtx
=
pCxt
;
pWrapper
->
pCtx
=
pCxt
;
pWrapper
->
pQuery
=
pQuery
;
pWrapper
->
pRequest
=
pRequest
;
pWrapper
->
pRequest
=
pRequest
;
pWrapper
->
catalogReq
=
catalogReq
;
pWrapper
->
catalogReq
=
catalogReq
;
...
...
source/libs/executor/src/timewindowoperator.c
浏览文件 @
1f7821e6
...
@@ -1115,7 +1115,7 @@ static bool compareVal(const char* v, const SStateKeys* pKey) {
...
@@ -1115,7 +1115,7 @@ static bool compareVal(const char* v, const SStateKeys* pKey) {
if
(
varDataLen
(
v
)
!=
varDataLen
(
pKey
->
pData
))
{
if
(
varDataLen
(
v
)
!=
varDataLen
(
pKey
->
pData
))
{
return
false
;
return
false
;
}
else
{
}
else
{
return
strn
cmp
(
varDataVal
(
v
),
varDataVal
(
pKey
->
pData
),
varDataLen
(
v
))
==
0
;
return
mem
cmp
(
varDataVal
(
v
),
varDataVal
(
pKey
->
pData
),
varDataLen
(
v
))
==
0
;
}
}
}
else
{
}
else
{
return
memcmp
(
pKey
->
pData
,
v
,
pKey
->
bytes
)
==
0
;
return
memcmp
(
pKey
->
pData
,
v
,
pKey
->
bytes
)
==
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录