Skip to content

Do not call fsync in lock implementation#15229

Merged
josevalim merged 1 commit intoelixir-lang:mainfrom
jonatanklosko:jk-lock-fsync
Apr 2, 2026
Merged

Do not call fsync in lock implementation#15229
josevalim merged 1 commit intoelixir-lang:mainfrom
jonatanklosko:jk-lock-fsync

Conversation

@jonatanklosko
Copy link
Copy Markdown
Member

Closes #15228.

Currently the lock implementation calls fsync when changing the switch-file for atomic changes, but that can be relatively expensive. fsync is only relevant for durability. As long as we don't use delayed writes (which we don't), the writes should be immediately visible to other processes reading the file. Any os-level caching is shared across processes.

@josevalim josevalim merged commit 017162a into elixir-lang:main Apr 2, 2026
15 checks passed
@josevalim
Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Null compile triggered by Phoenix CodeReloader is slow

2 participants