Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
镜像
OpenAtomFoundation
pika
提交
8caa55ca
pika
项目概览
镜像
/
OpenAtomFoundation
/
pika
9 个月 前同步成功
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
pika
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
8caa55ca
编写于
8月 13, 2022
作者:
L
lqx
提交者:
kernelai
8月 15, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add Rocksdb to read parameters from the configuration file
上级
d1dc319d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
12 addition
and
0 deletion
+12
-0
conf/pika.conf
conf/pika.conf
+3
-0
include/pika_conf.h
include/pika_conf.h
+2
-0
src/pika_conf.cc
src/pika_conf.cc
+4
-0
src/pika_server.cc
src/pika_server.cc
+3
-0
未找到文件。
conf/pika.conf
浏览文件 @
8caa55ca
...
...
@@ -146,6 +146,9 @@ max-bytes-for-level-multiplier : 10
# share-block-cache: no
# whether or not index and filter blocks is stored in block cache
# cache-index-and-filter-blocks: no
# pin_l0_filter_and_index_blocks_in_cache [yes | no]
# When `cache-index-and-filter-blocks` is enabled, `pin_l0_filter_and_index_blocks_in_cache` is suggested to be enabled
# pin_l0_filter_and_index_blocks_in_cache : no
# when set to yes, bloomfilter of the last level will not be built
# optimize-filters-for-hits: no
# https://github.com/facebook/rocksdb/wiki/Leveled-Compaction#levels-target-size
...
...
include/pika_conf.h
浏览文件 @
8caa55ca
...
...
@@ -75,6 +75,7 @@ class PikaConf : public slash::BaseConf {
int64_t
block_cache
()
{
RWLock
l
(
&
rwlock_
,
false
);
return
block_cache_
;
}
bool
share_block_cache
()
{
RWLock
l
(
&
rwlock_
,
false
);
return
share_block_cache_
;
}
bool
cache_index_and_filter_blocks
()
{
RWLock
l
(
&
rwlock_
,
false
);
return
cache_index_and_filter_blocks_
;
}
bool
pin_l0_filter_and_index_blocks_in_cache
()
{
RWLock
l
(
&
rwlock_
,
false
);
return
pin_l0_filter_and_index_blocks_in_cache_
;
}
bool
optimize_filters_for_hits
()
{
RWLock
l
(
&
rwlock_
,
false
);
return
optimize_filters_for_hits_
;
}
bool
level_compaction_dynamic_level_bytes
()
{
RWLock
l
(
&
rwlock_
,
false
);
return
level_compaction_dynamic_level_bytes_
;
}
int
expire_logs_nums
()
{
RWLock
l
(
&
rwlock_
,
false
);
return
expire_logs_nums_
;
}
...
...
@@ -343,6 +344,7 @@ class PikaConf : public slash::BaseConf {
int64_t
block_cache_
;
bool
share_block_cache_
;
bool
cache_index_and_filter_blocks_
;
bool
pin_l0_filter_and_index_blocks_in_cache_
;
bool
optimize_filters_for_hits_
;
bool
level_compaction_dynamic_level_bytes_
;
std
::
atomic
<
int
>
sync_window_size_
;
...
...
src/pika_conf.cc
浏览文件 @
8caa55ca
...
...
@@ -456,6 +456,10 @@ int PikaConf::Load()
GetConfStr
(
"cache-index-and-filter-blocks"
,
&
ciafb
);
cache_index_and_filter_blocks_
=
(
ciafb
==
"yes"
)
?
true
:
false
;
std
::
string
plfaibic
;
GetConfStr
(
"pin_l0_filter_and_index_blocks_in_cache"
,
&
plfaibic
);
pin_l0_filter_and_index_blocks_in_cache_
=
(
plfaibic
==
"yes"
)
?
true
:
false
;
std
::
string
offh
;
GetConfStr
(
"optimize-filters-for-hits"
,
&
offh
);
optimize_filters_for_hits_
=
(
offh
==
"yes"
)
?
true
:
false
;
...
...
src/pika_server.cc
浏览文件 @
8caa55ca
...
...
@@ -1650,6 +1650,9 @@ void PikaServer::InitBlackwidowOptions() {
bw_options_
.
block_cache_size
=
g_pika_conf
->
block_cache
();
bw_options_
.
share_block_cache
=
g_pika_conf
->
share_block_cache
();
bw_options_
.
table_options
.
pin_l0_filter_and_index_blocks_in_cache
=
g_pika_conf
->
pin_l0_filter_and_index_blocks_in_cache
();
if
(
bw_options_
.
block_cache_size
==
0
)
{
bw_options_
.
table_options
.
no_block_cache
=
true
;
}
else
if
(
bw_options_
.
share_block_cache
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录