Skip to content

Atomic writes with fsync for calibration data#962

Merged
mprib merged 2 commits intomainfrom
fix/atomic-csv-writes
Mar 9, 2026
Merged

Atomic writes with fsync for calibration data#962
mprib merged 2 commits intomainfrom
fix/atomic-csv-writes

Conversation

@mprib
Copy link
Owner

@mprib mprib commented Mar 9, 2026

Summary

  • Calibration data files (image points, world points, camera array) are now written to a temp file first, fsynced to disk, then renamed into place
  • Prevents partial/corrupted writes if the process or system crashes mid-save
  • Bumps version to 0.7.5

mprib added 2 commits March 9, 2026 15:12
NTFS journals file metadata but not data by default. If a crash or
power loss occurs between allocation and data flush, the file ends up
with null bytes in unwritten clusters.

High-value persistence writes (image points, world points, camera
array TOML) now write to a .tmp file, fsync to force data to disk,
then atomically rename. The original file is untouched until the new
one is fully committed to disk.
@mprib mprib merged commit 19d562e into main Mar 9, 2026
3 checks passed
@mprib mprib deleted the fix/atomic-csv-writes branch March 9, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant