▲ | d1l 4 days ago | |||||||||||||||||||||||||||||||
This is disingenuous and probably was written this way for HN cred and clicks. Sqlite's test suite simulates just about every kind of failure you can imagine - this document is worth reading if you have any doubts: https://www.sqlite.org/atomiccommit.html | ||||||||||||||||||||||||||||||||
▲ | eatonphil 4 days ago | parent | next [-] | |||||||||||||||||||||||||||||||
> Sqlite's test suite simulates just about every kind of failure you can imagine The page you link even mentions scenarios they know about that do happen and that they still assume won't happen. So even sqlite doesn't make anywhere near as strong a claim as you make. > SQLite assumes that the operating system will buffer writes and that a write request will return before data has actually been stored in the mass storage device. SQLite further assumes that write operations will be reordered by the operating system. For this reason, SQLite does a "flush" or "fsync" operation at key points. SQLite assumes that the flush or fsync will not return until all pending write operations for the file that is being flushed have completed. We are told that the flush and fsync primitives are broken on some versions of Windows and Linux. This is unfortunate. It opens SQLite up to the possibility of database corruption following a power loss in the middle of a commit. However, there is nothing that SQLite can do to test for or remedy the situation. SQLite assumes that the operating system that it is running on works as advertised. If that is not quite the case, well then hopefully you will not lose power too often. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
▲ | agwa 4 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
That document addresses atomicity, not durability, and is thus non-responsive to my concerns. | ||||||||||||||||||||||||||||||||
▲ | 4 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||
[deleted] |