dice icon indicating copy to clipboard operation
dice copied to clipboard

Flush store data to temp file in BGREWRITEAOF command and use fsync

Open ashwaniYDV opened this issue 6 months ago • 0 comments

Improve BGREWRITEAOF command (Issue is picked from TODO part in codebase)

  • Make it safe from failure, an stable policy would be to write the new flushes to a temporary files and then rename them to the main process's AOF file
  • Add fsync() and fdatasync() to persist to AOF for above cases.

Improvements

  • If BGREWRITEAOF fails, no data gets lost as the old AOF will be untouched.

ashwaniYDV avatar Aug 22 '24 19:08 ashwaniYDV