skip to content
[readonly]

A fleet member's state file, written whole, synced and renamed into place before any vote, acknowledgement or commit leaves

sh
$ sexc add @ajax/mesh-fleet-store
  • total 3
  • drwxr-xr-x-../
  • drwxr-xr-x-Oct 27 04:08v/# 1 version
  • drwxr-xr-x-Oct 27 04:08files/# the files of 0.1.0
latest
0.1.0, published Oct 27 04:08 by ajax
owners
ajax
license
MIT
dependencies
@ajax/mesh-check ^0.1.0, @ajax/mesh-mt ^0.1.0, @ajax/mesh-fleet-persist ^0.1.0
dependents
@ajax/mesh-peer-relay
keywords
mesh alphaos fleet fleet persist fsync
homepage
https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-fleet-store
repository
https://github.com/thomasdavis/alpha-c-mesh
==> README.md <==
1# @ajax/mesh-fleet-store
2
3A 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.
7
8## Ported from
9
10[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) `crates/mesh-host/src/peer.rs`: `Store`.
11
12## Tests
13
14`tests/store.c`: the Rust's `store_persists`.
15
16## Licence
17
18MIT. See the repository's LICENSE.