Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e2056ba8
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看板
提交
e2056ba8
编写于
1月 04, 2023
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'main' into FIX/TD-21043-main
上级
bf6dc994
9b71bd18
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
46 addition
and
22 deletion
+46
-22
cmake/taostools_CMakeLists.txt.in
cmake/taostools_CMakeLists.txt.in
+1
-1
include/libs/executor/executor.h
include/libs/executor/executor.h
+2
-0
source/dnode/vnode/src/tsdb/tsdbMemTable.c
source/dnode/vnode/src/tsdb/tsdbMemTable.c
+4
-4
source/libs/executor/src/executor.c
source/libs/executor/src/executor.c
+9
-0
source/libs/qworker/src/qworker.c
source/libs/qworker/src/qworker.c
+13
-2
source/util/src/tcompare.c
source/util/src/tcompare.c
+9
-8
tests/system-test/2-query/json_tag.py
tests/system-test/2-query/json_tag.py
+8
-7
未找到文件。
cmake/taostools_CMakeLists.txt.in
浏览文件 @
e2056ba8
...
...
@@ -2,7 +2,7 @@
# taos-tools
ExternalProject_Add(taos-tools
GIT_REPOSITORY https://github.com/taosdata/taos-tools.git
GIT_TAG
11b60a4
GIT_TAG
4776778
SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools"
BINARY_DIR ""
#BUILD_IN_SOURCE TRUE
...
...
include/libs/executor/executor.h
浏览文件 @
e2056ba8
...
...
@@ -154,6 +154,8 @@ void qCleanExecTaskBlockBuf(qTaskInfo_t tinfo);
*/
int32_t
qAsyncKillTask
(
qTaskInfo_t
tinfo
,
int32_t
rspCode
);
bool
qTaskIsExecuting
(
qTaskInfo_t
qinfo
);
/**
* destroy query info structure
* @param qHandle
...
...
source/dnode/vnode/src/tsdb/tsdbMemTable.c
浏览文件 @
e2056ba8
...
...
@@ -22,10 +22,10 @@
#define SL_NODE_SIZE(l) (sizeof(SMemSkipListNode) + ((l) << 4))
#define SL_NODE_FORWARD(n, l) ((n)->forwards[l])
#define SL_NODE_BACKWARD(n, l) ((n)->forwards[(n)->level + (l)])
#define SL_GET_NODE_FORWARD(n, l) ((SMemSkipListNode *)atomic_load_
64((int64_t *)
&SL_NODE_FORWARD(n, l)))
#define SL_GET_NODE_BACKWARD(n, l) ((SMemSkipListNode *)atomic_load_
64((int64_t *)
&SL_NODE_BACKWARD(n, l)))
#define SL_SET_NODE_FORWARD(n, l, p) atomic_store_
64((int64_t *)&SL_NODE_FORWARD(n, l), (int64_t)(p)
)
#define SL_SET_NODE_BACKWARD(n, l, p) atomic_store_
64((int64_t *)&SL_NODE_BACKWARD(n, l), (int64_t)(p)
)
#define SL_GET_NODE_FORWARD(n, l) ((SMemSkipListNode *)atomic_load_
ptr(
&SL_NODE_FORWARD(n, l)))
#define SL_GET_NODE_BACKWARD(n, l) ((SMemSkipListNode *)atomic_load_
ptr(
&SL_NODE_BACKWARD(n, l)))
#define SL_SET_NODE_FORWARD(n, l, p) atomic_store_
ptr(&SL_NODE_FORWARD(n, l), p
)
#define SL_SET_NODE_BACKWARD(n, l, p) atomic_store_
ptr(&SL_NODE_BACKWARD(n, l), p
)
#define SL_MOVE_BACKWARD 0x1
#define SL_MOVE_FROM_POS 0x2
...
...
source/libs/executor/src/executor.c
浏览文件 @
e2056ba8
...
...
@@ -704,6 +704,15 @@ int32_t qAsyncKillTask(qTaskInfo_t qinfo, int32_t rspCode) {
return
TSDB_CODE_SUCCESS
;
}
bool
qTaskIsExecuting
(
qTaskInfo_t
qinfo
)
{
SExecTaskInfo
*
pTaskInfo
=
(
SExecTaskInfo
*
)
qinfo
;
if
(
NULL
==
pTaskInfo
)
{
return
false
;
}
return
0
!=
atomic_load_64
(
&
pTaskInfo
->
owner
);
}
static
void
printTaskExecCostInLog
(
SExecTaskInfo
*
pTaskInfo
)
{
STaskCostInfo
*
pSummary
=
&
pTaskInfo
->
cost
;
int64_t
idleTime
=
pSummary
->
start
-
pSummary
->
created
;
...
...
source/libs/qworker/src/qworker.c
浏览文件 @
e2056ba8
...
...
@@ -202,6 +202,15 @@ _return:
QW_RET
(
code
);
}
bool
qwTaskNotInExec
(
SQWTaskCtx
*
ctx
)
{
qTaskInfo_t
taskHandle
=
ctx
->
taskHandle
;
if
(
NULL
==
taskHandle
||
!
qTaskIsExecuting
(
taskHandle
))
{
return
true
;
}
return
false
;
}
int32_t
qwGenerateSchHbRsp
(
SQWorker
*
mgmt
,
SQWSchStatus
*
sch
,
SQWHbInfo
*
hbInfo
)
{
int32_t
taskNum
=
0
;
...
...
@@ -508,9 +517,11 @@ int32_t qwHandlePostPhaseEvents(QW_FPARAMS_DEF, int8_t phase, SQWPhaseInput *inp
}
if
(
QW_EVENT_RECEIVED
(
ctx
,
QW_EVENT_DROP
))
{
if
(
QW_PHASE_POST_FETCH
!=
phase
||
qwTaskNotInExec
(
ctx
))
{
QW_ERR_JRET
(
qwDropTask
(
QW_FPARAMS
()));
QW_ERR_JRET
(
ctx
->
rspCode
);
}
}
if
(
ctx
->
rspCode
)
{
QW_TASK_ELOG
(
"task already failed, phase %s, error:%x - %s"
,
qwPhaseStr
(
phase
),
ctx
->
rspCode
,
...
...
source/util/src/tcompare.c
浏览文件 @
e2056ba8
...
...
@@ -23,6 +23,7 @@
#include "thash.h"
#include "tlog.h"
#include "types.h"
#include "osString.h"
int32_t
setChkInBytes1
(
const
void
*
pLeft
,
const
void
*
pRight
)
{
return
NULL
!=
taosHashGet
((
SHashObj
*
)
pRight
,
pLeft
,
1
)
?
1
:
0
;
...
...
@@ -208,16 +209,16 @@ int32_t compareLenPrefixedWStr(const void *pLeft, const void *pRight) {
int32_t
len1
=
varDataLen
(
pLeft
);
int32_t
len2
=
varDataLen
(
pRight
);
if
(
len1
!=
len2
)
{
return
len1
>
len2
?
1
:
-
1
;
}
else
{
int32_t
ret
=
memcmp
((
TdUcs4
*
)
pLeft
,
(
TdUcs4
*
)
pRight
,
len1
);
int32_t
ret
=
tasoUcs4Compare
((
TdUcs4
*
)
varDataVal
(
pLeft
),
(
TdUcs4
*
)
varDataVal
(
pRight
),
len1
>
len2
?
len2
:
len1
);
if
(
ret
==
0
)
{
if
(
len1
>
len2
)
return
1
;
else
if
(
len1
<
len2
)
return
-
1
;
else
return
0
;
}
else
{
return
ret
>
0
?
1
:
-
1
;
}
}
return
(
ret
<
0
)
?
-
1
:
1
;
}
int32_t
compareLenPrefixedWStrDesc
(
const
void
*
pLeft
,
const
void
*
pRight
)
{
...
...
tests/system-test/2-query/json_tag.py
浏览文件 @
e2056ba8
...
...
@@ -408,8 +408,8 @@ class TDTestCase:
# test group by & order by json tag
tdSql
.
query
(
f
"select ts,jtag->'tag1' from
{
dbname
}
.jsons1 partition by jtag->'tag1' order by jtag->'tag1' desc"
)
tdSql
.
checkRows
(
11
)
tdSql
.
checkData
(
0
,
1
,
'"
femail
"'
)
tdSql
.
checkData
(
2
,
1
,
'"
收到货
"'
)
tdSql
.
checkData
(
0
,
1
,
'"
收到货
"'
)
tdSql
.
checkData
(
2
,
1
,
'"
femail
"'
)
tdSql
.
checkData
(
7
,
1
,
"false"
)
...
...
@@ -421,9 +421,10 @@ class TDTestCase:
tdSql
.
query
(
f
"select count(*),jtag->'tag1' from
{
dbname
}
.jsons1 group by jtag->'tag1' order by jtag->'tag1' desc"
)
tdSql
.
checkRows
(
8
)
tdSql
.
checkData
(
0
,
0
,
2
)
tdSql
.
checkData
(
0
,
1
,
'"femail"'
)
tdSql
.
checkData
(
0
,
1
,
'"收到货"'
)
tdSql
.
checkData
(
1
,
1
,
'"femail"'
)
tdSql
.
checkData
(
1
,
0
,
2
)
tdSql
.
checkData
(
1
,
1
,
'"收到货"'
)
tdSql
.
checkData
(
2
,
0
,
1
)
tdSql
.
checkData
(
2
,
1
,
"11.000000000"
)
tdSql
.
checkData
(
5
,
0
,
1
)
...
...
@@ -437,7 +438,7 @@ class TDTestCase:
tdSql
.
checkData
(
5
,
0
,
1
)
tdSql
.
checkData
(
5
,
1
,
"11.000000000"
)
tdSql
.
checkData
(
7
,
0
,
2
)
tdSql
.
checkData
(
7
,
1
,
'"
femail
"'
)
tdSql
.
checkData
(
7
,
1
,
'"
收到货
"'
)
# test stddev with group by json tag
tdSql
.
query
(
f
"select stddev(dataint),jtag->'tag1' from
{
dbname
}
.jsons1 group by jtag->'tag1' order by jtag->'tag1'"
)
...
...
@@ -445,8 +446,8 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
checkData
(
4
,
0
,
0
)
tdSql
.
checkData
(
4
,
1
,
"5.000000000"
)
tdSql
.
checkData
(
7
,
0
,
11
)
tdSql
.
checkData
(
7
,
1
,
'"
femail
"'
)
tdSql
.
checkData
(
6
,
0
,
11
)
tdSql
.
checkData
(
7
,
1
,
'"
收到货
"'
)
res
=
tdSql
.
getColNameList
(
f
"select stddev(dataint),jsons1.jtag->'tag1' from
{
dbname
}
.jsons1 group by jsons1.jtag->'tag1' order by jtag->'tag1'"
)
cname_list
=
[]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录