3 ms·
I don't think you can create a conflict as in "corrupt the database", but it is definitely possible to lose data depending on how you have set your FSYNC settin
by WJW 4y ago
I don't think you can create a conflict as in "corrupt the database", but it is definitely possible to lose data depending on how you have set your FSYNC settings in the redis config. The docs mention that a truncated AOF file (such as might happen during a power failure) will not invalidate it but the last command will be lost. The default is to sync to disk every second, so you could lose up to a second of data that your backend did consider to be written. You can also set it to fsync after every write query, but this will be much slower.
https://redis.io/docs/manual/persistence/ https://redis.io/docs/manual/persistence/ has all the details.