▲ | adambb 2 days ago | ||||||||||||||||||||||||||||||||||||||||||||||
The disk controller may decide to write out blocks in a different order than the logical layout in the log file itself, and be interrupted before completing this work. | |||||||||||||||||||||||||||||||||||||||||||||||
▲ | grumbelbart2 a day ago | parent | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||
Just wondering how SQLite would ever work if it had zero control over this. Surely there must be some "flush" operation that guarantees that everthing so far is written to disk? Otherwise, any "old" block that contains data might have not been written. SQLite says: > Local devices also have a characteristic which is critical for enabling database management software to be designed to ensure ACID behavior: When all process writes to the device have completed, (when POSIX fsync() or Windows FlushFileBuffers() calls return), the filesystem then either has stored the "written" data or will do so before storing any subsequently written data. | |||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||
▲ | johncolanduoni 2 days ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||
It’s worth noting this is also dependent on filesystem behavior; most that do copy-on-write will not suffer from this issue regardless of drive behavior, even if they don’t do their own checksumming. | |||||||||||||||||||||||||||||||||||||||||||||||
▲ | hinkley 2 days ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||||||||||||||
We still have the elevator algorithm on NVMe? | |||||||||||||||||||||||||||||||||||||||||||||||
|