Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
24b5a59f
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,体验更适合开发者的 AI 搜索 >>
提交
24b5a59f
编写于
8月 11, 2017
作者:
N
Nikolai Kochetov
浏览文件
操作
浏览文件
下载
差异文件
merged with remote [#CLICKHOUSE-3033]
上级
90940d84
4398d71e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
14 addition
and
10 deletion
+14
-10
dbms/src/Interpreters/Settings.h
dbms/src/Interpreters/Settings.h
+1
-1
dbms/src/Storages/Distributed/DirectoryMonitor.cpp
dbms/src/Storages/Distributed/DirectoryMonitor.cpp
+1
-1
dbms/src/Storages/Distributed/DirectoryMonitor.h
dbms/src/Storages/Distributed/DirectoryMonitor.h
+1
-1
dbms/src/Storages/Distributed/DistributedBlockOutputStream.cpp
...src/Storages/Distributed/DistributedBlockOutputStream.cpp
+10
-6
dbms/src/Storages/StorageDistributed.h
dbms/src/Storages/StorageDistributed.h
+1
-1
未找到文件。
dbms/src/Interpreters/Settings.h
浏览文件 @
24b5a59f
...
...
@@ -290,7 +290,7 @@ struct Settings
\
/** If setting is enabled, insert query into distributed waits until data will be sent to all nodes in cluster. \
*/
\
M(SettingBool, insert_distributed_sync,
0
) \
M(SettingBool, insert_distributed_sync,
false
) \
/** Timeout for insert query into distributed. Setting is used only with insert_distributed_sync enabled. \
* Zero value means no timeout. \
*/
\
...
...
dbms/src/Storages/Distributed/DirectoryMonitor.cpp
浏览文件 @
24b5a59f
...
...
@@ -86,7 +86,7 @@ namespace
}
StorageDistributedDirectoryMonitor
::
StorageDistributedDirectoryMonitor
(
StorageDistributed
&
storage
,
const
std
::
string
&
name
,
ConnectionPoolPtr
pool
)
StorageDistributedDirectoryMonitor
::
StorageDistributedDirectoryMonitor
(
StorageDistributed
&
storage
,
const
std
::
string
&
name
,
const
ConnectionPoolPtr
&
pool
)
:
storage
(
storage
),
pool
{
pool
},
path
{
storage
.
path
+
name
+
'/'
}
,
current_batch_file_path
{
path
+
"current_batch.txt"
}
,
default_sleep_time
{
storage
.
context
.
getSettingsRef
().
distributed_directory_monitor_sleep_time_ms
.
totalMilliseconds
()}
...
...
dbms/src/Storages/Distributed/DirectoryMonitor.h
浏览文件 @
24b5a59f
...
...
@@ -16,7 +16,7 @@ namespace DB
class
StorageDistributedDirectoryMonitor
{
public:
StorageDistributedDirectoryMonitor
(
StorageDistributed
&
storage
,
const
std
::
string
&
name
,
ConnectionPoolPtr
pool
);
StorageDistributedDirectoryMonitor
(
StorageDistributed
&
storage
,
const
std
::
string
&
name
,
const
ConnectionPoolPtr
&
pool
);
~
StorageDistributedDirectoryMonitor
();
static
ConnectionPoolPtr
createPool
(
const
std
::
string
&
name
,
const
StorageDistributed
&
storage
);
...
...
dbms/src/Storages/Distributed/DistributedBlockOutputStream.cpp
浏览文件 @
24b5a59f
...
...
@@ -93,7 +93,7 @@ ThreadPool::Job DistributedBlockOutputStream::createWritingJob(
if
(
!
current_memory_tracker
)
{
current_memory_tracker
=
memory_tracker
;
setThreadName
(
"Distr
ibutedBlockOutputStream
Proc"
);
setThreadName
(
"Distr
OutStr
Proc"
);
}
try
{
...
...
@@ -151,7 +151,8 @@ std::string DistributedBlockOutputStream::getCurrentStateDescription(const Writi
for
(
const
auto
&
address
:
addresses_with_failovers
[
shard_id
])
if
(
!
address
.
is_local
)
{
writeDescription
(
address
,
shard_id
,
blocks_inserted
+
(
context
.
done_remote_jobs
[
remote_job_id
++
]
?
1
:
0
));
writeDescription
(
address
,
shard_id
,
blocks_inserted
+
(
context
.
done_remote_jobs
[
remote_job_id
]
?
1
:
0
));
++
remote_job_id
;
if
(
shard_info
.
hasInternalReplication
())
break
;
}
...
...
@@ -160,7 +161,8 @@ std::string DistributedBlockOutputStream::getCurrentStateDescription(const Writi
if
(
shard_info
.
isLocal
())
{
const
auto
&
address
=
shard_info
.
local_addresses
.
front
();
writeDescription
(
address
,
shard_id
,
blocks_inserted
+
(
context
.
done_local_jobs
[
local_job_id
++
]
?
1
:
0
));
writeDescription
(
address
,
shard_id
,
blocks_inserted
+
(
context
.
done_local_jobs
[
local_job_id
]
?
1
:
0
));
++
local_job_id
;
}
}
...
...
@@ -184,7 +186,8 @@ void DistributedBlockOutputStream::createWritingJobs(WritingJobContext & context
for
(
const
auto
&
address
:
addresses_with_failovers
[
shard_id
])
if
(
!
address
.
is_local
)
{
pool
->
schedule
(
createWritingJob
(
context
,
blocks
[
shard_id
],
address
,
shard_id
,
remote_job_id
++
));
pool
->
schedule
(
createWritingJob
(
context
,
blocks
[
shard_id
],
address
,
shard_id
,
remote_job_id
));
++
remote_job_id
;
if
(
shard_info
.
hasInternalReplication
())
break
;
}
...
...
@@ -193,7 +196,8 @@ void DistributedBlockOutputStream::createWritingJobs(WritingJobContext & context
if
(
shards_info
[
shard_id
].
isLocal
())
{
const
auto
&
address
=
shards_info
[
shard_id
].
local_addresses
.
front
();
pool
->
schedule
(
createWritingJob
(
context
,
blocks
[
shard_id
],
address
,
shard_id
,
local_job_id
++
));
pool
->
schedule
(
createWritingJob
(
context
,
blocks
[
shard_id
],
address
,
shard_id
,
local_job_id
));
++
local_job_id
;
}
}
}
...
...
@@ -270,7 +274,7 @@ void DistributedBlockOutputStream::writeSync(const Block & block)
{
waitForUnfinishedJobs
(
context
);
}
catch
(
Exception
&
exception
)
catch
(
Exception
&
exception
)
{
exception
.
addMessage
(
getCurrentStateDescription
(
context
));
throw
;
...
...
dbms/src/Storages/StorageDistributed.h
浏览文件 @
24b5a59f
...
...
@@ -118,7 +118,7 @@ private:
/// create directory monitors for each existing subdirectory
void
createDirectoryMonitors
();
/// ensure directory monitor thread
by subdirectory name creation
/// ensure directory monitor thread
creation by subdirectory name
void
requireDirectoryMonitor
(
const
std
::
string
&
name
);
/// ensure connection pool creation and return it
ConnectionPoolPtr
requireConnectionPool
(
const
std
::
string
&
name
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录