2 ms·
Why transactions?
by CoastalCoder 3y ago
Why transactions?
- two_handfuls 3y agoBecause it’s the best way to survive failures (such as loss of power). Transactions allow you to know that all your datastructures are in a consistent state.
- Findecanor 3y agoIt would also enforce that writes happen only when a program explicitly declares that it is necessary. When writes are persistent and cause wear, the consequences of e.g. a common buffer overflow or use-after-free bug can be much higher than if they were not. Even an unoptimised loop that writes to NVRAM could be bad.