Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xindoo
redis
提交
eed8495b
R
redis
项目概览
xindoo
/
redis
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
redis
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
eed8495b
编写于
4月 04, 2014
作者:
A
antirez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make LZF in-memory compression actually configurable.
上级
9acac9ce
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
0 deletion
+15
-0
redis.conf
redis.conf
+4
-0
src/config.c
src/config.c
+11
-0
未找到文件。
redis.conf
浏览文件 @
eed8495b
...
...
@@ -762,3 +762,7 @@ hz 10
# big latency spikes.
aof
-
rewrite
-
incremental
-
fsync
yes
# Transparently compress string objects in memory using LZF.
# For default this is set to no since it may affect performances, however
# when caching things like HTML fragments this may result into a big win.
memcompression
no
src/config.c
浏览文件 @
eed8495b
...
...
@@ -297,6 +297,10 @@ void loadServerConfigFromString(char *config) {
if
((
server
.
rdb_compression
=
yesnotoi
(
argv
[
1
]))
==
-
1
)
{
err
=
"argument must be 'yes' or 'no'"
;
goto
loaderr
;
}
}
else
if
(
!
strcasecmp
(
argv
[
0
],
"memcompression"
)
&&
argc
==
2
)
{
if
((
server
.
mem_compression
=
yesnotoi
(
argv
[
1
]))
==
-
1
)
{
err
=
"argument must be 'yes' or 'no'"
;
goto
loaderr
;
}
}
else
if
(
!
strcasecmp
(
argv
[
0
],
"rdbchecksum"
)
&&
argc
==
2
)
{
if
((
server
.
rdb_checksum
=
yesnotoi
(
argv
[
1
]))
==
-
1
)
{
err
=
"argument must be 'yes' or 'no'"
;
goto
loaderr
;
...
...
@@ -860,6 +864,11 @@ void configSetCommand(redisClient *c) {
if
(
yn
==
-
1
)
goto
badfmt
;
server
.
rdb_compression
=
yn
;
}
else
if
(
!
strcasecmp
(
c
->
argv
[
2
]
->
ptr
,
"memcompression"
))
{
int
yn
=
yesnotoi
(
o
->
ptr
);
if
(
yn
==
-
1
)
goto
badfmt
;
server
.
mem_compression
=
yn
;
}
else
if
(
!
strcasecmp
(
c
->
argv
[
2
]
->
ptr
,
"notify-keyspace-events"
))
{
int
flags
=
keyspaceEventsStringToFlags
(
o
->
ptr
);
...
...
@@ -1006,6 +1015,7 @@ void configGetCommand(redisClient *c) {
server
.
stop_writes_on_bgsave_err
);
config_get_bool_field
(
"daemonize"
,
server
.
daemonize
);
config_get_bool_field
(
"rdbcompression"
,
server
.
rdb_compression
);
config_get_bool_field
(
"memcompression"
,
server
.
mem_compression
);
config_get_bool_field
(
"rdbchecksum"
,
server
.
rdb_checksum
);
config_get_bool_field
(
"activerehashing"
,
server
.
activerehashing
);
config_get_bool_field
(
"repl-disable-tcp-nodelay"
,
...
...
@@ -1721,6 +1731,7 @@ int rewriteConfig(char *path) {
rewriteConfigNumericalOption
(
state
,
"databases"
,
server
.
dbnum
,
REDIS_DEFAULT_DBNUM
);
rewriteConfigYesNoOption
(
state
,
"stop-writes-on-bgsave-error"
,
server
.
stop_writes_on_bgsave_err
,
REDIS_DEFAULT_STOP_WRITES_ON_BGSAVE_ERROR
);
rewriteConfigYesNoOption
(
state
,
"rdbcompression"
,
server
.
rdb_compression
,
REDIS_DEFAULT_RDB_COMPRESSION
);
rewriteConfigYesNoOption
(
state
,
"memcompression"
,
server
.
mem_compression
,
REDIS_DEFAULT_MEM_COMPRESSION
);
rewriteConfigYesNoOption
(
state
,
"rdbchecksum"
,
server
.
rdb_checksum
,
REDIS_DEFAULT_RDB_CHECKSUM
);
rewriteConfigStringOption
(
state
,
"dbfilename"
,
server
.
rdb_filename
,
REDIS_DEFAULT_RDB_FILENAME
);
rewriteConfigDirOption
(
state
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录