mirror of
https://github.com/discourse/discourse.git
synced 2025-02-10 05:14:59 +00:00
83e649d08e
On startup, (including when starting a rails console) we manipule a collection of plugin files. Writing these files is done in multiple observable steps, which presents opportunities for race conditions and causes temporary corruption. This commit uses the write, fsync and rename trick to atomically overwrite these files instead, but reads them first to avoid unnecessary writes. c457d3bf was a previous attempt to fix the same problem.