2

Redis with the AOF (append only file) parameter enabled can only lose a second of data. I know that Tarantool has wal_move='write' by default, as this mode provides data persistence for vinyl and memtx, and in what case can this result in data loss that cannot be restored?

The second part of the question: what wal_mode setting do you recommend none/write/fsync for vinyl and memtx in particular?

I would like to get a constructive answer because a similar question was asked earlier but raised even more questions and he didn't give a clear answer: Difference between Redis AOF and Tarantool WAL log

Andrew Nodermann
  • 610
  • 8
  • 13

1 Answers1

1

Wal-mode write' may lose not more that 1 record (in case of hard server reboot); wal-mode fsync never loses data.

You may refer to tarantool documentation here: https://www.tarantool.io/en/doc/1.10/reference/configuration/#confval-wal_mode

It implies that for write mode every operation is not acknowledged to the client until write syscall succeeds, and for fsync mode it is not acknowledged until a subsequent fsync syscall succeeds.

Thus, fsync mode "never" loses data - as it is persisted on disk before replying to the client. write mode may lose data during system reboot - data which was accepted to OS buffer but not flushed to disk. On typical workloads we've encountered cases when a single operation was lost in such a case.

Dmitry Sharonov
  • 471
  • 2
  • 12