mirror of
https://github.com/fluencelabs/redis
synced 2025-04-09 10:46:06 +00:00
AOF write error: retry with a frequency of 1 hz.
This commit is contained in:
parent
fe8352540f
commit
fc08c8599f
17
src/redis.c
17
src/redis.c
@ -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 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user