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
fc08c859
Commit
fc08c859
authored
Feb 12, 2014
by
antirez
Browse files
AOF write error: retry with a frequency of 1 hz.
parent
fe835254
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis.c
View file @
fc08c859
...
@@ -1167,12 +1167,17 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
...
@@ -1167,12 +1167,17 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
}
}
/* AOF: we may have postponed buffer flush, or were not able to
/* AOF postponed flush: Try at every cron cycle if the slow fsync
* write our buffer because of write(2) error. Try again here. */
* completed. */
if
(
server
.
aof_flush_postponed_start
||
if
(
server
.
aof_flush_postponed_start
)
flushAppendOnlyFile
(
0
);
server
.
aof_last_write_status
==
REDIS_ERR
)
{
/* AOF write errors: in this case we have a buffer to flush as well and
flushAppendOnlyFile
(
0
);
* clear the AOF error in case of success to make the DB writable again,
* however to try every second is enough in case of 'hz' is set to
* an higher frequency. */
run_with_period
(
1000
)
{
if
(
server
.
aof_last_write_status
==
REDIS_ERR
)
flushAppendOnlyFile
(
0
);
}
}
/* Close clients that need to be closed asynchronous */
/* Close clients that need to be closed asynchronous */
...
...
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