1# @ajax/mesh-fleet-store
23A fleet member's state file (`--fleet-state`): its term, vote and documents (`@ajax/mesh-fleet-persist`)
4written whole to a temp file, `fsync`ed, renamed into place and the directory `fsync`ed, so nothing a
5vote, acknowledgement or commit depends on is lost to a crash; `mfs_open` reads it (an absent file is a
6fresh member; one written for another cluster size is refused) and writes it back at once.
78## Ported from
910[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) `crates/mesh-host/src/peer.rs`: `Store`.
1112## Tests
1314`tests/store.c`: the Rust's `store_persists`.
1516## Licence
1718MIT. See the repository's LICENSE.