mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
Fixed a subtle VM bug... was not flushing the buffer so the child process read truncated data
This commit is contained in:
parent
a3f9eec291
commit
ba76a8f901
2
redis.c
2
redis.c
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user