Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
0ec93220
Commit
0ec93220
authored
Jun 10, 2011
by
antirez
Browse files
CONFIG SET/GET support for new automatic AOF rewrite parameters
parent
c66bf1fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/config.c
View file @
0ec93220
...
@@ -407,6 +407,12 @@ void configSetCommand(redisClient *c) {
...
@@ -407,6 +407,12 @@ void configSetCommand(redisClient *c) {
}
}
}
}
}
}
}
else
if
(
!
strcasecmp
(
c
->
argv
[
2
]
->
ptr
,
"auto-aof-rewrite-percentage"
))
{
if
(
getLongLongFromObject
(
o
,
&
ll
)
==
REDIS_ERR
||
ll
<
0
)
goto
badfmt
;
server
.
auto_aofrewrite_perc
=
ll
;
}
else
if
(
!
strcasecmp
(
c
->
argv
[
2
]
->
ptr
,
"auto-aof-rewrite-min-size"
))
{
if
(
getLongLongFromObject
(
o
,
&
ll
)
==
REDIS_ERR
||
ll
<
0
)
goto
badfmt
;
server
.
auto_aofrewrite_min_size
=
ll
;
}
else
if
(
!
strcasecmp
(
c
->
argv
[
2
]
->
ptr
,
"save"
))
{
}
else
if
(
!
strcasecmp
(
c
->
argv
[
2
]
->
ptr
,
"save"
))
{
int
vlen
,
j
;
int
vlen
,
j
;
sds
*
v
=
sdssplitlen
(
o
->
ptr
,
sdslen
(
o
->
ptr
),
" "
,
1
,
&
vlen
);
sds
*
v
=
sdssplitlen
(
o
->
ptr
,
sdslen
(
o
->
ptr
),
" "
,
1
,
&
vlen
);
...
@@ -593,6 +599,16 @@ void configGetCommand(redisClient *c) {
...
@@ -593,6 +599,16 @@ void configGetCommand(redisClient *c) {
sdsfree
(
buf
);
sdsfree
(
buf
);
matches
++
;
matches
++
;
}
}
if
(
stringmatch
(
pattern
,
"auto-aof-rewrite-percentage"
,
0
))
{
addReplyBulkCString
(
c
,
"auto-aof-rewrite-percentage"
);
addReplyBulkLongLong
(
c
,
server
.
auto_aofrewrite_perc
);
matches
++
;
}
if
(
stringmatch
(
pattern
,
"auto-aof-rewrite-min-size"
,
0
))
{
addReplyBulkCString
(
c
,
"auto-aof-rewrite-min-size"
);
addReplyBulkLongLong
(
c
,
server
.
auto_aofrewrite_min_size
);
matches
++
;
}
if
(
stringmatch
(
pattern
,
"slave-serve-stale-data"
,
0
))
{
if
(
stringmatch
(
pattern
,
"slave-serve-stale-data"
,
0
))
{
addReplyBulkCString
(
c
,
"slave-serve-stale-data"
);
addReplyBulkCString
(
c
,
"slave-serve-stale-data"
);
addReplyBulkCString
(
c
,
server
.
repl_serve_stale_data
?
"yes"
:
"no"
);
addReplyBulkCString
(
c
,
server
.
repl_serve_stale_data
?
"yes"
:
"no"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment