sapling/lib/indexedlog
Jun Wu 66cef07cf9 indexedlog: add a fsync option to Log and Index
Summary:
Add a way to explicitly `fsync` data to reduce changes of data corruption in
case of hard reboots.

If `fsync` is set on a `Log`, it sets `fsync` recursively on its indexes and
checksum tables. If frequent `fsync` is an issue, it might be possible to only
`fsync` the source of truth (log and meta) and have other logic to rebuild
indexes on demand.

`fsync` on btrfs seems to be relatively cheap (comparing to ext4), so maybe
this is fine for btrfs users.

Reviewed By: markbt

Differential Revision: D16926659

fbshipit-source-id: a9de2fa352f607fe6f0b9d36047323862770f2e6
2019-08-26 19:57:20 -07:00
..
benches indexedlog: add benchmark about lock overhead 2019-05-24 18:54:20 -07:00
src indexedlog: add a fsync option to Log and Index 2019-08-26 19:57:20 -07:00
Cargo.toml indexedlog: use failure for error handling 2019-04-05 12:17:28 -07:00