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
ba76a8f9
Commit
ba76a8f9
authored
Mar 02, 2010
by
antirez
Browse files
Fixed a subtle VM bug... was not flushing the buffer so the child process read truncated data
parent
a3f9eec2
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis.c
View file @
ba76a8f9
...
...
@@ -7416,6 +7416,7 @@ static int vmWriteObjectOnSwap(robj *o, off_t page) {
return
REDIS_ERR
;
}
rdbSaveObject
(
server
.
vm_fp
,
o
);
fflush
(
server
.
vm_fp
);
if
(
server
.
vm_enabled
)
pthread_mutex_unlock
(
&
server
.
io_swapfile_mutex
);
return
REDIS_OK
;
}
...
...
@@ -7443,7 +7444,6 @@ static int vmSwapObjectBlocking(robj *key, robj *val) {
(
unsigned
long
long
)
page
,
(
unsigned
long
long
)
pages
);
server
.
vm_stats_swapped_objects
++
;
server
.
vm_stats_swapouts
++
;
fflush
(
server
.
vm_fp
);
return
REDIS_OK
;
}
...
...
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