Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
85dc9973
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看板
提交
85dc9973
编写于
7月 13, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/hotfix/TD-816' into feature/vnode
上级
1c40d471
5fa3660f
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
16 addition
and
4 deletion
+16
-4
src/inc/taoserror.h
src/inc/taoserror.h
+1
-0
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+4
-0
src/query/src/qast.c
src/query/src/qast.c
+4
-2
src/tsdb/src/tsdbRead.c
src/tsdb/src/tsdbRead.c
+2
-1
src/util/inc/exception.h
src/util/inc/exception.h
+2
-1
src/util/src/exception.c
src/util/src/exception.c
+3
-0
未找到文件。
src/inc/taoserror.h
浏览文件 @
85dc9973
...
@@ -209,6 +209,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_QRY_NO_DISKSPACE, 0, 0x0702, "query no d
...
@@ -209,6 +209,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_QRY_NO_DISKSPACE, 0, 0x0702, "query no d
TAOS_DEFINE_ERROR
(
TSDB_CODE_QRY_OUT_OF_MEMORY
,
0
,
0x0703
,
"query out of memory"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_QRY_OUT_OF_MEMORY
,
0
,
0x0703
,
"query out of memory"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_QRY_APP_ERROR
,
0
,
0x0704
,
"query app error"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_QRY_APP_ERROR
,
0
,
0x0704
,
"query app error"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_QRY_DUP_JOIN_KEY
,
0
,
0x0705
,
"query duplicated join key"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_QRY_DUP_JOIN_KEY
,
0
,
0x0705
,
"query duplicated join key"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_QRY_EXCEED_TAGS_LIMIT
,
0
,
0x0706
,
"query tag conditon too many"
)
// grant
// grant
TAOS_DEFINE_ERROR
(
TSDB_CODE_GRANT_EXPIRED
,
0
,
0x0800
,
"grant expired"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_GRANT_EXPIRED
,
0
,
0x0800
,
"grant expired"
)
...
...
src/query/src/qExecutor.c
浏览文件 @
85dc9973
...
@@ -5370,6 +5370,7 @@ static int32_t buildAirthmeticExprFromMsg(SExprInfo *pArithExprInfo, SQueryTable
...
@@ -5370,6 +5370,7 @@ static int32_t buildAirthmeticExprFromMsg(SExprInfo *pArithExprInfo, SQueryTable
pExprNode
=
exprTreeFromBinary
(
pArithExprInfo
->
base
.
arg
[
0
].
argValue
.
pz
,
pArithExprInfo
->
base
.
arg
[
0
].
argBytes
);
pExprNode
=
exprTreeFromBinary
(
pArithExprInfo
->
base
.
arg
[
0
].
argValue
.
pz
,
pArithExprInfo
->
base
.
arg
[
0
].
argBytes
);
}
CATCH
(
code
)
{
}
CATCH
(
code
)
{
CLEANUP_EXECUTE
();
CLEANUP_EXECUTE
();
qError
(
"qmsg:%p failed to create arithmetic expression string from:%s, reason: %s"
,
pQueryMsg
,
pArithExprInfo
->
base
.
arg
[
0
].
argValue
.
pz
,
tstrerror
(
code
));
return
code
;
return
code
;
}
END_TRY
}
END_TRY
...
@@ -6104,6 +6105,9 @@ int32_t qCreateQueryInfo(void* tsdb, int32_t vgId, SQueryTableMsg* pQueryMsg, vo
...
@@ -6104,6 +6105,9 @@ int32_t qCreateQueryInfo(void* tsdb, int32_t vgId, SQueryTableMsg* pQueryMsg, vo
code
=
tsdbQuerySTableByTagCond
(
tsdb
,
id
->
uid
,
tagCond
,
pQueryMsg
->
tagCondLen
,
pQueryMsg
->
tagNameRelType
,
tbnameCond
,
&
tableGroupInfo
,
pGroupColIndex
,
code
=
tsdbQuerySTableByTagCond
(
tsdb
,
id
->
uid
,
tagCond
,
pQueryMsg
->
tagCondLen
,
pQueryMsg
->
tagNameRelType
,
tbnameCond
,
&
tableGroupInfo
,
pGroupColIndex
,
numOfGroupByCols
);
numOfGroupByCols
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
if
(
code
==
TSDB_CODE_QRY_EXCEED_TAGS_LIMIT
)
{
qError
(
"qmsg:%p failed to QueryStable, reason: %s"
,
pQueryMsg
,
tstrerror
(
code
));
}
goto
_over
;
goto
_over
;
}
}
}
else
{
}
else
{
...
...
src/query/src/qast.c
浏览文件 @
85dc9973
...
@@ -962,10 +962,13 @@ static UNUSED_FUNC char* exception_strdup(const char* str) {
...
@@ -962,10 +962,13 @@ static UNUSED_FUNC char* exception_strdup(const char* str) {
static
tExprNode
*
exprTreeFromBinaryImpl
(
SBufferReader
*
br
)
{
static
tExprNode
*
exprTreeFromBinaryImpl
(
SBufferReader
*
br
)
{
int32_t
anchor
=
CLEANUP_GET_ANCHOR
();
int32_t
anchor
=
CLEANUP_GET_ANCHOR
();
if
(
CLEANUP_EXCEED_LIMIT
())
{
THROW
(
TSDB_CODE_QRY_EXCEED_TAGS_LIMIT
);
return
NULL
;
}
tExprNode
*
pExpr
=
exception_calloc
(
1
,
sizeof
(
tExprNode
));
tExprNode
*
pExpr
=
exception_calloc
(
1
,
sizeof
(
tExprNode
));
CLEANUP_PUSH_VOID_PTR_PTR
(
true
,
tExprNodeDestroy
,
pExpr
,
NULL
);
CLEANUP_PUSH_VOID_PTR_PTR
(
true
,
tExprNodeDestroy
,
pExpr
,
NULL
);
pExpr
->
nodeType
=
tbufReadUint8
(
br
);
pExpr
->
nodeType
=
tbufReadUint8
(
br
);
if
(
pExpr
->
nodeType
==
TSQL_NODE_VALUE
)
{
if
(
pExpr
->
nodeType
==
TSQL_NODE_VALUE
)
{
...
@@ -995,7 +998,6 @@ static tExprNode* exprTreeFromBinaryImpl(SBufferReader* br) {
...
@@ -995,7 +998,6 @@ static tExprNode* exprTreeFromBinaryImpl(SBufferReader* br) {
pExpr
->
_node
.
hasPK
=
tbufReadUint8
(
br
);
pExpr
->
_node
.
hasPK
=
tbufReadUint8
(
br
);
pExpr
->
_node
.
pLeft
=
exprTreeFromBinaryImpl
(
br
);
pExpr
->
_node
.
pLeft
=
exprTreeFromBinaryImpl
(
br
);
pExpr
->
_node
.
pRight
=
exprTreeFromBinaryImpl
(
br
);
pExpr
->
_node
.
pRight
=
exprTreeFromBinaryImpl
(
br
);
assert
(
pExpr
->
_node
.
pLeft
!=
NULL
&&
pExpr
->
_node
.
pRight
!=
NULL
);
assert
(
pExpr
->
_node
.
pLeft
!=
NULL
&&
pExpr
->
_node
.
pRight
!=
NULL
);
}
}
...
...
src/tsdb/src/tsdbRead.c
浏览文件 @
85dc9973
...
@@ -2217,7 +2217,8 @@ int32_t tsdbQuerySTableByTagCond(TSDB_REPO_T* tsdb, uint64_t uid, const char* pT
...
@@ -2217,7 +2217,8 @@ int32_t tsdbQuerySTableByTagCond(TSDB_REPO_T* tsdb, uint64_t uid, const char* pT
}
CATCH
(
code
)
{
}
CATCH
(
code
)
{
CLEANUP_EXECUTE
();
CLEANUP_EXECUTE
();
ret
=
code
;
terrno
=
code
;
goto
_error
;
// TODO: more error handling
// TODO: more error handling
}
END_TRY
}
END_TRY
...
...
src/util/inc/exception.h
浏览文件 @
85dc9973
...
@@ -78,6 +78,7 @@ void cleanupPush_int_ptr ( bool failOnly, void* func, void* arg );
...
@@ -78,6 +78,7 @@ void cleanupPush_int_ptr ( bool failOnly, void* func, void* arg );
int32_t
cleanupGetActionCount
();
int32_t
cleanupGetActionCount
();
void
cleanupExecuteTo
(
int32_t
anchor
,
bool
failed
);
void
cleanupExecuteTo
(
int32_t
anchor
,
bool
failed
);
void
cleanupExecute
(
SExceptionNode
*
node
,
bool
failed
);
void
cleanupExecute
(
SExceptionNode
*
node
,
bool
failed
);
bool
cleanupExceedLimit
();
#define CLEANUP_PUSH_VOID_PTR_PTR( failOnly, func, arg1, arg2 ) cleanupPush_void_ptr_ptr( (failOnly), (void*)(func), (void*)(arg1), (void*)(arg2) )
#define CLEANUP_PUSH_VOID_PTR_PTR( failOnly, func, arg1, arg2 ) cleanupPush_void_ptr_ptr( (failOnly), (void*)(func), (void*)(arg1), (void*)(arg2) )
#define CLEANUP_PUSH_VOID_PTR_BOOL( failOnly, func, arg1, arg2 ) cleanupPush_void_ptr_bool( (failOnly), (void*)(func), (void*)(arg1), (bool)(arg2) )
#define CLEANUP_PUSH_VOID_PTR_BOOL( failOnly, func, arg1, arg2 ) cleanupPush_void_ptr_bool( (failOnly), (void*)(func), (void*)(arg1), (bool)(arg2) )
...
@@ -91,7 +92,7 @@ void cleanupExecute( SExceptionNode* node, bool failed );
...
@@ -91,7 +92,7 @@ void cleanupExecute( SExceptionNode* node, bool failed );
#define CLEANUP_GET_ANCHOR() cleanupGetActionCount()
#define CLEANUP_GET_ANCHOR() cleanupGetActionCount()
#define CLEANUP_EXECUTE_TO( anchor, failed ) cleanupExecuteTo( (anchor), (failed) )
#define CLEANUP_EXECUTE_TO( anchor, failed ) cleanupExecuteTo( (anchor), (failed) )
#define CLEANUP_EXCEED_LIMIT() cleanupExceedLimit()
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// functions & macros for exception handling
// functions & macros for exception handling
...
...
src/util/src/exception.c
浏览文件 @
85dc9973
...
@@ -147,3 +147,6 @@ void cleanupExecuteTo( int32_t anchor, bool failed ) {
...
@@ -147,3 +147,6 @@ void cleanupExecuteTo( int32_t anchor, bool failed ) {
void
cleanupExecute
(
SExceptionNode
*
node
,
bool
failed
)
{
void
cleanupExecute
(
SExceptionNode
*
node
,
bool
failed
)
{
doExecuteCleanup
(
node
,
0
,
failed
);
doExecuteCleanup
(
node
,
0
,
failed
);
}
}
bool
cleanupExceedLimit
()
{
return
expList
->
numCleanupAction
>=
expList
->
maxCleanupAction
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录