Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
bf48eef8
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
bf48eef8
编写于
1月 28, 2021
作者:
H
haojun Liao
提交者:
GitHub
1月 28, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #5068 from taosdata/feature/TD-2863
[TD-2863]increase query buffer size to 64 bits
上级
198642e1
ddf6b297
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
20 addition
and
8 deletion
+20
-8
packaging/cfg/taos.cfg
packaging/cfg/taos.cfg
+6
-0
src/common/inc/tglobal.h
src/common/inc/tglobal.h
+2
-1
src/common/src/tglobal.c
src/common/src/tglobal.c
+6
-1
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+6
-6
未找到文件。
packaging/cfg/taos.cfg
浏览文件 @
bf48eef8
...
...
@@ -270,3 +270,9 @@
# in retrieve blocking model, only in 50% query threads will be used in query processing in dnode
# retrieveBlockingModel 0
# the maximum allowed query buffer size in MB during query processing for each data node
# -1 no limit (default)
# 0 no query allowed, queries are disabled
# queryBufferSize -1
src/common/inc/tglobal.h
浏览文件 @
bf48eef8
...
...
@@ -57,7 +57,8 @@ extern int32_t tsCompressMsgSize;
extern
char
tsTempDir
[];
//query buffer management
extern
int32_t
tsQueryBufferSize
;
// maximum allowed usage buffer for each data node during query processing
extern
int32_t
tsQueryBufferSize
;
// maximum allowed usage buffer size in MB for each data node during query processing
extern
int64_t
tsQueryBufferSizeBytes
;
// maximum allowed usage buffer size in byte for each data node during query processing
extern
int32_t
tsRetrieveBlockingModel
;
// retrieve threads will be blocked
extern
int8_t
tsKeepOriginalColumnName
;
...
...
src/common/src/tglobal.c
浏览文件 @
bf48eef8
...
...
@@ -105,6 +105,7 @@ int64_t tsMaxRetentWindow = 24 * 3600L; // maximum time window tolerance
// 0 no query allowed, queries are disabled
// positive value (in MB)
int32_t
tsQueryBufferSize
=
-
1
;
int64_t
tsQueryBufferSizeBytes
=
-
1
;
// in retrieve blocking model, the retrieve threads will wait for the completion of the query processing.
int32_t
tsRetrieveBlockingModel
=
0
;
...
...
@@ -283,7 +284,7 @@ bool taosCfgDynamicOptions(char *msg) {
int32_t
cfgLen
=
(
int32_t
)
strlen
(
cfg
->
option
);
if
(
cfgLen
!=
olen
)
continue
;
if
(
strncasecmp
(
option
,
cfg
->
option
,
olen
)
!=
0
)
continue
;
if
(
cfg
->
valType
!
=
TAOS_CFG_VTYPE_INT32
)
{
if
(
cfg
->
valType
=
=
TAOS_CFG_VTYPE_INT32
)
{
*
((
int32_t
*
)
cfg
->
ptr
)
=
vint
;
}
else
{
*
((
int8_t
*
)
cfg
->
ptr
)
=
(
int8_t
)
vint
;
...
...
@@ -1488,6 +1489,10 @@ int32_t taosCheckGlobalCfg() {
tsSyncPort
=
tsServerPort
+
TSDB_PORT_SYNC
;
tsHttpPort
=
tsServerPort
+
TSDB_PORT_HTTP
;
if
(
tsQueryBufferSize
>=
0
)
{
tsQueryBufferSizeBytes
=
tsQueryBufferSize
*
1048576UL
;
}
taosPrintGlobalCfg
();
return
0
;
...
...
src/query/src/qExecutor.c
浏览文件 @
bf48eef8
...
...
@@ -7730,15 +7730,15 @@ static int64_t getQuerySupportBufSize(size_t numOfTables) {
int32_t
checkForQueryBuf
(
size_t
numOfTables
)
{
int64_t
t
=
getQuerySupportBufSize
(
numOfTables
);
if
(
tsQueryBufferSize
<
0
)
{
if
(
tsQueryBufferSize
Bytes
<
0
)
{
return
TSDB_CODE_SUCCESS
;
}
else
if
(
tsQueryBufferSize
>
0
)
{
}
else
if
(
tsQueryBufferSize
Bytes
>
0
)
{
while
(
1
)
{
int64_t
s
=
tsQueryBufferSize
;
int64_t
s
=
tsQueryBufferSize
Bytes
;
int64_t
remain
=
s
-
t
;
if
(
remain
>=
0
)
{
if
(
atomic_val_compare_exchange_64
(
&
tsQueryBufferSize
,
s
,
remain
)
==
s
)
{
if
(
atomic_val_compare_exchange_64
(
&
tsQueryBufferSize
Bytes
,
s
,
remain
)
==
s
)
{
return
TSDB_CODE_SUCCESS
;
}
}
else
{
...
...
@@ -7752,14 +7752,14 @@ int32_t checkForQueryBuf(size_t numOfTables) {
}
void
releaseQueryBuf
(
size_t
numOfTables
)
{
if
(
tsQueryBufferSize
<=
0
)
{
if
(
tsQueryBufferSize
Bytes
<
0
)
{
return
;
}
int64_t
t
=
getQuerySupportBufSize
(
numOfTables
);
// restore value is not enough buffer available
atomic_add_fetch_64
(
&
tsQueryBufferSize
,
t
);
atomic_add_fetch_64
(
&
tsQueryBufferSize
Bytes
,
t
);
}
void
*
qGetResultRetrieveMsg
(
qinfo_t
qinfo
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录