Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
e8902aa6
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,发现更多精彩内容 >>
提交
e8902aa6
编写于
2月 09, 2015
作者:
A
Alexey Arno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
dbms: Server: queries with several replicas: fixes [#METR-14410]
上级
8c0a5403
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
2 addition
and
108 deletion
+2
-108
dbms/include/DB/Storages/StorageReplicatedMergeTree.h
dbms/include/DB/Storages/StorageReplicatedMergeTree.h
+0
-4
dbms/src/Interpreters/InterpreterSelectQuery.cpp
dbms/src/Interpreters/InterpreterSelectQuery.cpp
+0
-7
dbms/src/Storages/StorageReplicatedMergeTree.cpp
dbms/src/Storages/StorageReplicatedMergeTree.cpp
+1
-1
dbms/tests/queries/0_stateless/00124_distributed_with_many_replicas.reference
..._stateless/00124_distributed_with_many_replicas.reference
+0
-45
dbms/tests/queries/0_stateless/00124_distributed_with_many_replicas.sql
...ries/0_stateless/00124_distributed_with_many_replicas.sql
+1
-51
未找到文件。
dbms/include/DB/Storages/StorageReplicatedMergeTree.h
浏览文件 @
e8902aa6
...
...
@@ -103,8 +103,6 @@ public:
/// Добавить кусок в очередь кусков, чьи данные нужно проверить в фоновом потоке.
void
enqueuePartForCheck
(
const
String
&
name
);
void
skipUnreplicated
()
{
process_unreplicated
=
false
;
}
MergeTreeData
&
getData
()
{
return
data
;
}
MergeTreeData
*
getUnreplicatedData
()
{
return
unreplicated_data
.
get
();
}
...
...
@@ -166,8 +164,6 @@ private:
current_zookeeper
=
zookeeper
;
}
bool
process_unreplicated
=
true
;
/// Если true, таблица в офлайновом режиме, и в нее нельзя писать.
bool
is_readonly
=
false
;
...
...
dbms/src/Interpreters/InterpreterSelectQuery.cpp
浏览文件 @
e8902aa6
...
...
@@ -25,7 +25,6 @@
#include <DB/Interpreters/InterpreterSelectQuery.h>
#include <DB/Storages/StorageView.h>
#include <DB/Storages/StorageReplicatedMergeTree.h>
#include <DB/TableFunctions/ITableFunction.h>
#include <DB/TableFunctions/TableFunctionFactory.h>
...
...
@@ -105,12 +104,6 @@ void InterpreterSelectQuery::basicInit(BlockInputStreamPtr input_, const NamesAn
+
" does not support parallel execution on several replicas"
,
ErrorCodes
::
STORAGE_DOESNT_SUPPORT_PARALLEL_REPLICAS
);
if
(
StorageReplicatedMergeTree
*
storage_replicated_merge_tree
=
typeid_cast
<
StorageReplicatedMergeTree
*>
(
&*
storage
))
{
if
(
settings
.
parallel_replica_offset
>
0
)
storage_replicated_merge_tree
->
skipUnreplicated
();
}
table_lock
=
storage
->
lockStructure
(
false
);
if
(
table_column_names
.
empty
())
context
.
setColumns
(
storage
->
getColumnsListNonMaterialized
());
...
...
dbms/src/Storages/StorageReplicatedMergeTree.cpp
浏览文件 @
e8902aa6
...
...
@@ -2027,7 +2027,7 @@ BlockInputStreams StorageReplicatedMergeTree::read(
size_t
part_index
=
0
;
if
(
process_unreplicated
&&
unreplicated_reader
&&
values
.
count
(
0
))
if
(
(
settings
.
parallel_replica_offset
==
0
)
&&
unreplicated_reader
&&
values
.
count
(
0
))
{
res
=
unreplicated_reader
->
read
(
real_column_names
,
query
,
context
,
settings
,
processed_stage
,
...
...
dbms/tests/queries/0_stateless/00124_distributed_with_many_replicas.reference
浏览文件 @
e8902aa6
...
...
@@ -3,48 +3,3 @@
3 2015-03-01 3 foo
4 2015-04-01 4 bar
5 2015-05-01 5 foo
6 2015-06-01 6 bar
7 2015-07-01 7 foo
8 2015-08-01 8 bar
9 2015-09-01 9 foo
10 2015-10-01 10 bar
11 2015-11-01 1 foo
12 2015-12-01 2 bar
13 2015-01-01 3 foo
14 2015-02-01 4 bar
15 2015-03-01 5 foo
16 2015-04-01 6 bar
17 2015-05-01 7 foo
18 2015-06-01 8 bar
19 2015-07-01 9 foo
20 2015-08-01 10 bar
21 2015-09-01 1 foo
22 2015-10-01 2 bar
23 2015-11-01 3 foo
24 2015-12-01 4 bar
25 2015-01-01 5 foo
26 2015-02-01 6 bar
27 2015-03-01 7 foo
28 2015-04-01 8 bar
29 2015-05-01 9 foo
30 2015-06-01 10 bar
31 2015-07-01 1 foo
32 2015-08-01 2 bar
33 2015-09-01 3 foo
34 2015-10-01 4 bar
35 2015-11-01 5 foo
36 2015-12-01 6 bar
37 2015-01-01 7 foo
38 2015-02-01 8 bar
39 2015-03-01 9 foo
40 2015-04-01 10 bar
41 2015-05-01 1 foo
42 2015-06-01 2 bar
43 2015-07-01 3 foo
44 2015-08-01 4 bar
45 2015-09-01 5 foo
46 2015-10-01 6 bar
47 2015-11-01 7 foo
48 2015-12-01 8 bar
49 2015-01-01 9 foo
50 2015-02-01 10 bar
dbms/tests/queries/0_stateless/00124_distributed_with_many_replicas.sql
浏览文件 @
e8902aa6
...
...
@@ -4,57 +4,7 @@ DROP TABLE IF EXISTS test.report;
CREATE
TABLE
test
.
report
(
id
UInt32
,
event_date
Date
,
priority
UInt32
,
description
String
)
ENGINE
=
MergeTree
(
event_date
,
intHash32
(
id
),
(
id
,
event_date
,
intHash32
(
id
)),
8192
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
1
,
'2015-01-01'
,
1
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
2
,
'2015-02-01'
,
2
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
3
,
'2015-03-01'
,
3
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
4
,
'2015-04-01'
,
4
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
5
,
'2015-05-01'
,
5
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
6
,
'2015-06-01'
,
6
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
7
,
'2015-07-01'
,
7
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
8
,
'2015-08-01'
,
8
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
9
,
'2015-09-01'
,
9
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
10
,
'2015-10-01'
,
10
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
11
,
'2015-11-01'
,
1
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
12
,
'2015-12-01'
,
2
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
13
,
'2015-01-01'
,
3
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
14
,
'2015-02-01'
,
4
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
15
,
'2015-03-01'
,
5
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
16
,
'2015-04-01'
,
6
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
17
,
'2015-05-01'
,
7
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
18
,
'2015-06-01'
,
8
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
19
,
'2015-07-01'
,
9
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
20
,
'2015-08-01'
,
10
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
21
,
'2015-09-01'
,
1
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
22
,
'2015-10-01'
,
2
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
23
,
'2015-11-01'
,
3
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
24
,
'2015-12-01'
,
4
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
25
,
'2015-01-01'
,
5
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
26
,
'2015-02-01'
,
6
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
27
,
'2015-03-01'
,
7
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
28
,
'2015-04-01'
,
8
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
29
,
'2015-05-01'
,
9
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
30
,
'2015-06-01'
,
10
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
31
,
'2015-07-01'
,
1
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
32
,
'2015-08-01'
,
2
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
33
,
'2015-09-01'
,
3
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
34
,
'2015-10-01'
,
4
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
35
,
'2015-11-01'
,
5
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
36
,
'2015-12-01'
,
6
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
37
,
'2015-01-01'
,
7
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
38
,
'2015-02-01'
,
8
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
39
,
'2015-03-01'
,
9
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
40
,
'2015-04-01'
,
10
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
41
,
'2015-05-01'
,
1
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
42
,
'2015-06-01'
,
2
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
43
,
'2015-07-01'
,
3
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
44
,
'2015-08-01'
,
4
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
45
,
'2015-09-01'
,
5
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
46
,
'2015-10-01'
,
6
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
47
,
'2015-11-01'
,
7
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
48
,
'2015-12-01'
,
8
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
49
,
'2015-01-01'
,
9
,
'foo'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
50
,
'2015-02-01'
,
10
,
'bar'
);
INSERT
INTO
test
.
report
(
id
,
event_date
,
priority
,
description
)
VALUES
(
1
,
'2015-01-01'
,
1
,
'foo'
)(
2
,
'2015-02-01'
,
2
,
'bar'
)(
3
,
'2015-03-01'
,
3
,
'foo'
)(
4
,
'2015-04-01'
,
4
,
'bar'
)(
5
,
'2015-05-01'
,
5
,
'foo'
);
SELECT
*
FROM
(
SELECT
id
,
event_date
,
priority
,
description
FROM
remote
(
'127.0.0.{1|2}'
,
test
,
report
))
ORDER
BY
id
ASC
;
DROP
TABLE
test
.
report
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录