NLnetLabs / kvx

Abstraction layer over various key-value store backends in Rust
BSD 3-Clause "New" or "Revised" License
6 stars 1 forks source link

Let disk impl write file to tmp file first, then rename #46

Closed timbru closed 1 year ago

timbru commented 1 year ago

We can end up with partially written values if the disk is full.

This can lead to data corruption issues if an existing key is overwritten. Therefore it would be better to first right the value to a random (unique) new file and then rename it, at least if the key already exists.

timbru commented 1 year ago

merged into prep-0.8.0