CMK-139

TitelWindows Agent: When overwriting a file (esp. state files) use an intermediate file to prevent data loss
KomponenteWindows Agent
Datum2018-02-20
StatusNew
KlasseBug


Currently, while the agent writes to file, that file is in an inconsistent state and should the agent be killed or crashes in just that moment, or if the data being written is broken/incomplete, we have data loss. Instead, we should write to an intermediate file first and only after a successful write, exchange the two filesmoving the old file away, moving the new file in and only then delete the old file.