mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 23:04:26 +01:00
15464e57af
1172: Fix atomic snapshot creation r=MarinPostma a=raszi Compress gzip files to a temporary file first and then do an atomic rename. In our setup we have an indexer which does snapshoting for the instances serving the requests. Since currently the snapshoting mechanism is replacing the file in place therefore the indexer could not share the snapshot with a live instance. With this small patch we first create a new temporary file in the same directory as the snapshot dir and then we do an atomic rename therefore the snapshot path would always contain a valid snapshot. After applying this change it would be enough to simply restart the serving instances to pick up the new snapshot from a shared storage without worrying them to die because of an incomplete snapshot. Co-authored-by: KARASZI István <ikaraszi@gmail.com> |
||
---|---|---|
.. | ||
helpers | ||
models | ||
routes | ||
analytics.rs | ||
data.rs | ||
dump.rs | ||
error.rs | ||
lib.rs | ||
main.rs | ||
option.rs | ||
snapshot.rs |