Skip to content

Implementation of atomic and durable file writes:#48

Merged
snoyberg merged 1 commit intofpco:masterfrom
lehins:atomic-durable-writes
Jul 12, 2019
Merged

Implementation of atomic and durable file writes:#48
snoyberg merged 1 commit intofpco:masterfrom
lehins:atomic-durable-writes

Conversation

@lehins
Copy link
Contributor

@lehins lehins commented Jul 10, 2019

  • Durability of file writes with the help of fsync() syscall
  • Atomicity of file writes with the help of atomic renames with
    rename(), renameat() and linkat() syscalls
  • Anonymous temp file utilization on Linux for atomic writes with the
    help of openat() and O_TMPFILE

@snoyberg The whole PR from commercialhaskell/rio#167 was transfered here almost verbatim, with an exception of some renames and haddock adjustments. The new module UnliftIO.IO.File is very heavy on haddock, therefore I though it be better to have it as a separate module, rather than cramming everything into UnliftIO.IO.

CC @nh2 (Thanks for review and guidance)

* Durability of file writes with the help of `fsync()` syscall on
  the file and containing folder
* Atomicity of file writes with the help of atomic renames with
  `rename()`, `renameat()` and `linkat()` syscalls, depending on how
  it was opened
* Anonymous temp file utilization on Linux for atomic writes with the
  help of `openat()` and `O_TMPFILE`
* Instead of merging this functionality into commercialhaskell/rio#167
  it has been moved upstream into `unliftio`
* Dropped support for ghc-7.8
@lehins lehins force-pushed the atomic-durable-writes branch from fff2eba to f64ec22 Compare July 11, 2019 13:28
@snoyberg snoyberg merged commit 40e0f72 into fpco:master Jul 12, 2019
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.

2 participants