Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
736b97c9
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,发现更多精彩内容 >>
提交
736b97c9
编写于
1月 22, 2020
作者:
N
Nikita Mikhaylov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
better
上级
97144cb6
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
4 addition
and
3 deletion
+4
-3
dbms/src/Dictionaries/CacheDictionary.cpp
dbms/src/Dictionaries/CacheDictionary.cpp
+4
-3
未找到文件。
dbms/src/Dictionaries/CacheDictionary.cpp
浏览文件 @
736b97c9
...
...
@@ -676,9 +676,8 @@ void registerDictionaryCache(DictionaryFactory & factory)
const
size_t
size
=
config
.
getUInt64
(
layout_prefix
+
".cache.size_in_cells"
);
if
(
size
==
0
)
throw
Exception
{
name
+
": dictionary of layout 'cache' cannot have 0 cells"
,
throw
Exception
{
full_
name
+
": dictionary of layout 'cache' cannot have 0 cells"
,
ErrorCodes
::
TOO_SMALL_BUFFER_SIZE
};
throw
Exception
{
full_name
+
": dictionary of layout 'cache' cannot have 0 cells"
,
ErrorCodes
::
TOO_SMALL_BUFFER_SIZE
};
const
bool
require_nonempty
=
config
.
getBool
(
config_prefix
+
".require_nonempty"
,
false
);
if
(
require_nonempty
)
...
...
@@ -713,7 +712,6 @@ void registerDictionaryCache(DictionaryFactory & factory)
return
std
::
make_unique
<
CacheDictionary
>
(
database
,
name
,
dict_struct
,
std
::
move
(
source_ptr
),
dict_lifetime
,
size
,
allow_read_expired_keys
,
max_update_queue_size
,
update_queue_push_timeout_milliseconds
,
each_update_finish_timeout_seconds
);
return
std
::
make_unique
<
CacheDictionary
>
(
database
,
name
,
dict_struct
,
std
::
move
(
source_ptr
),
dict_lifetime
,
size
);
};
factory
.
registerLayout
(
"cache"
,
create_layout
,
false
);
}
...
...
@@ -728,6 +726,9 @@ void CacheDictionary::updateThreadFunction()
UpdateUnitPtr
first_popped
;
update_queue
.
pop
(
first_popped
);
/// Wait other pointers to be pushed.
/// std::this_thread::sleep_for(std::chrono::milliseconds(1000));
/// Here we pop as many unit pointers from update queue as we can.
/// We fix current size to avoid livelock (or too long waiting),
/// when this thread pops from the queue and other threads push to the queue.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录