mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
Use fsync instead of aof_fsync in final AOF sync.
This happens in the child process so we don't care about latency: better to sync metadata as well.
This commit is contained in:
parent
a99766fda1
commit
57852ff207
@ -991,7 +991,7 @@ int rewriteAppendOnlyFile(char *filename) {
|
||||
|
||||
/* Make sure data will not remain on the OS's output buffers */
|
||||
if (fflush(fp) == EOF) goto werr;
|
||||
if (aof_fsync(fileno(fp)) == -1) goto werr;
|
||||
if (fsync(fileno(fp)) == -1) goto werr;
|
||||
if (fclose(fp) == EOF) goto werr;
|
||||
|
||||
/* Use RENAME to make sure the DB file is changed atomically only
|
||||
|
Loading…
Reference in New Issue
Block a user