Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
ee6a7ee2
C
ClickHouse
项目概览
2dot5
/
ClickHouse
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ClickHouse
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ee6a7ee2
编写于
4月 20, 2017
作者:
A
Alexey Milovidov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Allow to disable replicated max parallel fetches/sends [#CLICKHOUSE-2960].
上级
563e2124
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
5 addition
and
4 deletion
+5
-4
dbms/src/Storages/MergeTree/DataPartsExchange.cpp
dbms/src/Storages/MergeTree/DataPartsExchange.cpp
+2
-2
dbms/src/Storages/MergeTree/MergeTreeSettings.h
dbms/src/Storages/MergeTree/MergeTreeSettings.h
+1
-0
dbms/src/Storages/StorageReplicatedMergeTree.cpp
dbms/src/Storages/StorageReplicatedMergeTree.cpp
+2
-2
未找到文件。
dbms/src/Storages/MergeTree/DataPartsExchange.cpp
浏览文件 @
ee6a7ee2
...
...
@@ -55,8 +55,8 @@ void Service::processQuery(const Poco::Net::HTMLForm & params, ReadBuffer & body
static
std
::
atomic_uint
total_sends
{
0
};
if
(
total_sends
>=
data
.
settings
.
replicated_max_parallel_sends
||
data
.
current_table_sends
>=
data
.
settings
.
replicated_max_parallel_sends_for_table
)
if
(
(
data
.
settings
.
replicated_max_parallel_sends
&&
total_sends
>=
data
.
settings
.
replicated_max_parallel_sends
)
||
(
data
.
settings
.
replicated_max_parallel_sends_for_table
&&
data
.
current_table_sends
>=
data
.
settings
.
replicated_max_parallel_sends_for_table
)
)
{
response
.
setStatus
(
std
::
to_string
(
HTTP_TOO_MANY_REQUESTS
));
response
.
setReason
(
"Too many concurrent fetches, try again later"
);
...
...
dbms/src/Storages/MergeTree/MergeTreeSettings.h
浏览文件 @
ee6a7ee2
#pragma once
#include <Poco/Util/AbstractConfiguration.h>
#include <Core/Defines.h>
#include <Core/Types.h>
...
...
dbms/src/Storages/StorageReplicatedMergeTree.cpp
浏览文件 @
ee6a7ee2
...
...
@@ -1255,7 +1255,7 @@ bool StorageReplicatedMergeTree::executeLogEntry(const LogEntry & entry)
String
replica
=
findReplicaHavingCoveringPart
(
entry
.
new_part_name
,
true
,
covering_part
);
static
std
::
atomic_uint
total_fetches
{
0
};
if
(
total_fetches
>=
data
.
settings
.
replicated_max_parallel_fetches
)
if
(
data
.
settings
.
replicated_max_parallel_fetches
&&
total_fetches
>=
data
.
settings
.
replicated_max_parallel_fetches
)
{
throw
Exception
(
"Too much total fetches from replicas, maximum: "
+
toString
(
data
.
settings
.
replicated_max_parallel_fetches
),
ErrorCodes
::
TOO_MUCH_FETCHES
);
...
...
@@ -1264,7 +1264,7 @@ bool StorageReplicatedMergeTree::executeLogEntry(const LogEntry & entry)
++
total_fetches
;
SCOPE_EXIT
({
--
total_fetches
;});
if
(
current_table_fetches
>=
data
.
settings
.
replicated_max_parallel_fetches_for_table
)
if
(
data
.
settings
.
replicated_max_parallel_fetches_for_table
&&
current_table_fetches
>=
data
.
settings
.
replicated_max_parallel_fetches_for_table
)
{
throw
Exception
(
"Too much fetches from replicas for table, maximum: "
+
toString
(
data
.
settings
.
replicated_max_parallel_fetches_for_table
),
ErrorCodes
::
TOO_MUCH_FETCHES
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录