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
57b07380
Commit
57b07380
authored
Aug 30, 2010
by
Pieter Noordhuis
Browse files
Don't build a reply when replaying the AOF
parent
b301c1fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/aof.c
View file @
57b07380
...
@@ -272,12 +272,14 @@ int loadAppendOnlyFile(char *filename) {
...
@@ -272,12 +272,14 @@ int loadAppendOnlyFile(char *filename) {
fakeClient
->
argc
=
argc
;
fakeClient
->
argc
=
argc
;
fakeClient
->
argv
=
argv
;
fakeClient
->
argv
=
argv
;
cmd
->
proc
(
fakeClient
);
cmd
->
proc
(
fakeClient
);
/* Discard the reply objects list from the fake client */
while
(
listLength
(
fakeClient
->
reply
))
/* The fake client should not have a reply */
listDelNode
(
fakeClient
->
reply
,
listFirst
(
fakeClient
->
reply
));
redisAssert
(
fakeClient
->
bufpos
==
0
&&
listLength
(
fakeClient
->
reply
)
==
0
);
/* Clean up, ready for the next command */
/* Clean up, ready for the next command */
for
(
j
=
0
;
j
<
argc
;
j
++
)
decrRefCount
(
argv
[
j
]);
for
(
j
=
0
;
j
<
argc
;
j
++
)
decrRefCount
(
argv
[
j
]);
zfree
(
argv
);
zfree
(
argv
);
/* Handle swapping while loading big datasets when VM is on */
/* Handle swapping while loading big datasets when VM is on */
force_swapout
=
0
;
force_swapout
=
0
;
if
((
zmalloc_used_memory
()
-
server
.
vm_max_memory
)
>
1024
*
1024
*
32
)
if
((
zmalloc_used_memory
()
-
server
.
vm_max_memory
)
>
1024
*
1024
*
32
)
...
...
src/networking.c
View file @
57b07380
...
@@ -62,6 +62,7 @@ redisClient *createClient(int fd) {
...
@@ -62,6 +62,7 @@ redisClient *createClient(int fd) {
}
}
int
_ensureFileEvent
(
redisClient
*
c
)
{
int
_ensureFileEvent
(
redisClient
*
c
)
{
if
(
c
->
fd
<=
0
)
return
REDIS_ERR
;
if
(
c
->
bufpos
==
0
&&
listLength
(
c
->
reply
)
==
0
&&
if
(
c
->
bufpos
==
0
&&
listLength
(
c
->
reply
)
==
0
&&
(
c
->
replstate
==
REDIS_REPL_NONE
||
(
c
->
replstate
==
REDIS_REPL_NONE
||
c
->
replstate
==
REDIS_REPL_ONLINE
)
&&
c
->
replstate
==
REDIS_REPL_ONLINE
)
&&
...
...
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