Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f7261780
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看板
提交
f7261780
编写于
1月 21, 2020
作者:
H
hjxilinx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support order for super table projection query. #1166. [tbase-1477]
上级
29df3ea3
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
27 addition
and
8 deletion
+27
-8
src/client/src/tscServer.c
src/client/src/tscServer.c
+13
-4
src/inc/taoserror.h
src/inc/taoserror.h
+2
-2
src/inc/taosmsg.h
src/inc/taosmsg.h
+2
-1
src/inc/tglobalcfg.h
src/inc/tglobalcfg.h
+1
-0
src/rpc/src/tstring.c
src/rpc/src/tstring.c
+1
-1
src/util/src/tglobalcfg.c
src/util/src/tglobalcfg.c
+8
-0
未找到文件。
src/client/src/tscServer.c
浏览文件 @
f7261780
...
...
@@ -1174,10 +1174,18 @@ void tscRetrieveFromVnodeCallBack(void *param, TAOS_RES *tres, int numOfRows) {
if
(
numOfRows
>
0
)
{
assert
(
pRes
->
numOfRows
==
numOfRows
);
atomic_add_fetch_64
(
&
pState
->
numOfRetrievedRows
,
numOfRows
);
int64_t
num
=
atomic_add_fetch_64
(
&
pState
->
numOfRetrievedRows
,
numOfRows
);
tscTrace
(
"%p sub:%p retrieve numOfRows:%d totalNumOfRows:%d from ip:%u,vid:%d,orderOfSub:%d"
,
pPObj
,
pSql
,
pRes
->
numOfRows
,
pState
->
numOfRetrievedRows
,
pSvd
->
ip
,
pSvd
->
vnode
,
idx
);
if
(
num
>
tsMaxNumOfOrderedResults
)
{
tscError
(
"%p sub:%p num of OrderedRes is too many, max allowed:%"
PRId64
" , current:%"
PRId64
,
pPObj
,
pSql
,
tsMaxNumOfOrderedResults
,
num
);
tscAbortFurtherRetryRetrieval
(
trsupport
,
tres
,
TSDB_CODE_SORTED_RES_TOO_MANY
);
return
;
}
#ifdef _DEBUG_VIEW
printf
(
"received data from vnode: %d rows
\n
"
,
pRes
->
numOfRows
);
...
...
@@ -1213,12 +1221,11 @@ void tscRetrieveFromVnodeCallBack(void *param, TAOS_RES *tres, int numOfRows) {
#ifdef _DEBUG_VIEW
printf
(
"%"
PRIu64
" rows data flushed to disk:
\n
"
,
trsupport
->
localBuffer
->
numOfElems
);
SSrcColumnInfo
colInfo
[
256
]
=
{
0
};
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
&
pPObj
->
cmd
,
0
);
tscGetSrcColumnInfo
(
colInfo
,
pQueryInfo
);
tColModelDisplayEx
(
pDesc
->
pSchema
,
trsupport
->
localBuffer
->
data
,
trsupport
->
localBuffer
->
numOfElems
,
trsupport
->
localBuffer
->
numOfElems
,
colInfo
);
#endif
if
(
tsTotalTmpDirGB
!=
0
&&
tsAvailTmpDirGB
<
tsMinimalTmpDirGB
)
{
tscError
(
"%p sub:%p client disk space remain %.3f GB, need at least %.3f GB, stop query"
,
pPObj
,
pSql
,
tsAvailTmpDirGB
,
tsMinimalTmpDirGB
);
...
...
@@ -1251,7 +1258,7 @@ void tscRetrieveFromVnodeCallBack(void *param, TAOS_RES *tres, int numOfRows) {
tscTrace
(
"%p retrieve from %d vnodes completed.final NumOfRows:%d,start to build loser tree"
,
pPObj
,
pState
->
numOfTotal
,
pState
->
numOfRetrievedRows
);
SQueryInfo
*
pPQueryInfo
=
tscGetQueryInfoDetail
(
&
pPObj
->
cmd
,
0
);
tscClearInterpInfo
(
pPQueryInfo
);
...
...
@@ -1674,6 +1681,8 @@ int tscBuildQueryMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
pQueryMsg
->
nAggTimeInterval
=
htobe64
(
pQueryInfo
->
nAggTimeInterval
);
pQueryMsg
->
intervalTimeUnit
=
pQueryInfo
->
intervalTimeUnit
;
pQueryMsg
->
slidingTime
=
htobe64
(
pQueryInfo
->
nSlidingTime
);
if
(
pQueryInfo
->
nAggTimeInterval
<
0
)
{
tscError
(
"%p illegal value of aggregation time interval in query msg: %ld"
,
pSql
,
pQueryInfo
->
nAggTimeInterval
);
return
-
1
;
...
...
src/inc/taoserror.h
浏览文件 @
f7261780
...
...
@@ -125,7 +125,7 @@ extern "C" {
#define TSDB_CODE_BATCH_SIZE_TOO_BIG 104
#define TSDB_CODE_TIMESTAMP_OUT_OF_RANGE 105
#define TSDB_CODE_INVALID_QUERY_MSG 106 // failed to validate the sql expression msg by vnode
#define TSDB_CODE_
CACHE_BLOCK_TS_DISORDERED 107 // time stamp in cache block is disordered
#define TSDB_CODE_
SORTED_RES_TOO_MANY 107 // too many result for ordered super table projection query
#define TSDB_CODE_FILE_BLOCK_TS_DISORDERED 108 // time stamp in file block is disordered
#define TSDB_CODE_INVALID_COMMIT_LOG 109 // commit log init failed
#define TSDB_CODE_SERV_NO_DISKSPACE 110
...
...
@@ -137,7 +137,7 @@ extern "C" {
#define TSDB_CODE_INVALID_VNODE_STATUS 116
#define TSDB_CODE_FAILED_TO_LOCK_RESOURCES 117
#define TSDB_CODE_TABLE_ID_MISMATCH 118
#define TSDB_CODE_QUERY_CACHE_ERASED
119
#define TSDB_CODE_QUERY_CACHE_ERASED 119
#define TSDB_CODE_MAX_ERROR_CODE 120
...
...
src/inc/taosmsg.h
浏览文件 @
f7261780
...
...
@@ -514,7 +514,8 @@ typedef struct {
char
intervalTimeUnit
;
// time interval type, for revisement of interval(1d)
int64_t
nAggTimeInterval
;
// time interval for aggregation, in million second
int64_t
slidingTime
;
// value for sliding window
// tag schema, used to parse tag information in pSidExtInfo
uint64_t
pTagSchema
;
...
...
src/inc/tglobalcfg.h
浏览文件 @
f7261780
...
...
@@ -126,6 +126,7 @@ extern int tsEnableMonitorModule;
extern
int
tsRestRowLimit
;
extern
int
tsCompressMsgSize
;
extern
int
tsMaxSQLStringLen
;
extern
int
tsMaxNumOfOrderedResults
;
extern
char
tsSocketType
[
4
];
...
...
src/rpc/src/tstring.c
浏览文件 @
f7261780
...
...
@@ -231,7 +231,7 @@ char *tsError[] = {"success",
"batch size too big"
,
"timestamp out of range"
,
//105
"invalid query message"
,
"t
imestamp disordered in cache block
"
,
"t
oo many results from vnodes for sort
"
,
"timestamp disordered in file block"
,
"invalid commit log"
,
"no disk space on server"
,
//110
...
...
src/util/src/tglobalcfg.c
浏览文件 @
f7261780
...
...
@@ -124,6 +124,10 @@ int tsEnableMonitorModule = 1;
int
tsRestRowLimit
=
10240
;
int
tsMaxSQLStringLen
=
TSDB_MAX_SQL_LEN
;
// the maximum number of results for projection query on super table that are returned from
// one virtual node, to order according to timestamp
int
tsMaxNumOfOrderedResults
=
100000
;
/*
* denote if the server needs to compress response message at the application layer to client, including query rsp,
* metricmeta rsp, and multi-meter query rsp message body. The client compress the submit message to server.
...
...
@@ -672,6 +676,10 @@ static void doInitGlobalConfig() {
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
|
TSDB_CFG_CTYPE_B_SHOW
,
TSDB_MAX_SQL_LEN
,
TSDB_MAX_ALLOWED_SQL_LEN
,
0
,
TSDB_CFG_UTYPE_BYTE
);
tsInitConfigOption
(
cfg
++
,
"maxNumOfOrderedRes"
,
&
tsMaxNumOfOrderedResults
,
TSDB_CFG_VTYPE_INT
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
|
TSDB_CFG_CTYPE_B_SHOW
,
TSDB_MAX_SQL_LEN
,
TSDB_MAX_ALLOWED_SQL_LEN
,
0
,
TSDB_CFG_UTYPE_NONE
);
// locale & charset
tsInitConfigOption
(
cfg
++
,
"timezone"
,
tsTimezone
,
TSDB_CFG_VTYPE_STRING
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录