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
ed7b308c
Commit
ed7b308c
authored
Jul 27, 2012
by
Salvatore Sanfilippo
Browse files
Merge pull request #587 from saj/truncate-short-write-from-aof
Truncate short write from the AOF
parents
04950a9e
55302e9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/aof.c
View file @
ed7b308c
...
...
@@ -250,6 +250,13 @@ void flushAppendOnlyFile(int force) {
strerror
(
errno
),
(
long
)
nwritten
,
(
long
)
sdslen
(
server
.
aof_buf
));
if
(
ftruncate
(
server
.
aof_fd
,
server
.
aof_current_size
)
==
-
1
)
{
redisLog
(
REDIS_WARNING
,
"Could not remove short write "
"from the append-only file. Redis may refuse "
"to load the AOF the next time it starts. "
"ftruncate: %s"
,
strerror
(
errno
));
}
}
exit
(
1
);
}
...
...
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