LeisureLink / write-ahead-log

An implementation of write-ahead logging (WAL) for nodejs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

auto-sync option

opened this issue · comments

The WriteAheadLog, as well as the underlying LogIndexFile should be enhanced with an auto-sync option that when enabled ensures that every write operation is flushed to the underlying device immediately.

The intent of write-ordering between the index and the log entry file was intended to mitigate inconsistencies due to write failures, provided a sane recovery scheme is layered thereupon. However, immediate fsync as an option should comfort the paranoid and may even improve consistency in the face of certain types of failures. More testing and real-world experience will further illuminate us on the necessity.

Regardless of necessity we should build the comforting option.