When the config file for a given Ra member needs to be updated we overwrite it in place. Instead we should take the safer option of writing it to a temp file then moving in place.
This should avoid a possible corruption path that would stop members from being restarted.
When the
config
file for a given Ra member needs to be updated we overwrite it in place. Instead we should take the safer option of writing it to a temp file then moving in place.This should avoid a possible corruption path that would stop members from being restarted.
See https://github.com/rabbitmq/ra/blob/0422ef4520c5ea08decd8da09e7d7078261df9fc/src/ra_log.erl#L725