ecmwf / ecflow

ECMWF's workflow manager
Apache License 2.0
41 stars 15 forks source link

Replace checkpoint file atomically ECFLOW-1925 #51

Closed marcosbento closed 1 year ago

marcosbento commented 1 year ago

These changes modify the strategy used to store a checkpoint file.

Previously the storage operation consisted of (a) moving the current checkpoint file to a backup, and then (b) storing the contents of the checkpoint file. If the server was terminated during (b), the result would be a corrupt checkpoint file. The new strategy consists of (a) storing the contents of the checkpoint file in a temporary file; (b) moving the current checkpoint to backup; and, finally, (c) promoting the temporary checkpoint file to the current by simply renaming the file. In this case, even if the storage operation is interrupted, the current checkpoint file will never lack integrity.

Re ECFLOW-1925

codecov-commenter commented 1 year ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (3fca261) 80.17% compared to head (9e44c54) 83.55%.

Files Patch % Lines
Server/src/CheckPtSaver.cpp 87.50% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #51 +/- ## =========================================== + Coverage 80.17% 83.55% +3.38% =========================================== Files 575 541 -34 Lines 57916 52586 -5330 =========================================== - Hits 46432 43938 -2494 + Misses 11484 8648 -2836 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.