2 ms·
Or maybe stop using sqlite, and serialize your state to disk periodically, just like this document says. Modern filesystems are pretty good in maintaining file
by theamk 6y ago
Or maybe stop using sqlite, and serialize your state to disk periodically, just like this document says.
Modern filesystems are pretty good in maintaining file integrity if you use “atomic overwrite via rename” trick, and for extra assurance you can store an older version of config or five.
This will give you a “pretty robust” solution which will work “most of the time”, and that will completely avoid fsyncs and prolong your SSD life. What’s not to like about it?