MeiliSearch/meilisearch-http/src
bors[bot] 15464e57af
Merge #1172
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>
2021-02-02 12:37:33 +00:00
..
helpers Merge branch 'master' into atomic-rename 2021-01-19 13:04:31 +01:00
models introduce new key management 2020-02-14 12:54:07 +01:00
routes fix race condition in document addition 2021-01-13 13:17:52 +01:00
analytics.rs fix incompatible deps 2021-01-04 18:33:22 +01:00
data.rs make dumps reentrant 2020-12-15 13:05:01 +01:00
dump.rs fix race condition in document addition 2021-01-13 13:17:52 +01:00
error.rs remove maintenance error from http 2020-11-16 17:30:37 +01:00
lib.rs disable frontend in production 2020-11-23 13:13:10 +01:00
main.rs fix cors error 2021-01-12 16:46:53 +01:00
option.rs Increasing payload default size 2020-12-29 16:55:35 -05:00
snapshot.rs snapshot at start 2020-10-22 15:46:20 +02:00