NLnetLabs / krill

RPKI Certificate Authority and Publication Server written in Rust
https://nlnetlabs.nl/projects/routing/krill/
Mozilla Public License 2.0
294 stars 41 forks source link

Always write to temp file first, then move #1160

Closed timbru closed 10 months ago

timbru commented 10 months ago

I think this used to work before kvx, but I am not 100% sure. In any case... we should write all new files to a tempfile first, and then rename. Otherwise we can end up with halfwritten file if the system is rebooted.

Current behaviour of the KeyValueStore, now imported from kvx, is to only use a tempfile if the target file already exists.

ximon18 commented 10 months ago

This was included in v0.14.3.