mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
add storage.indexedlog-fsync config to turn on fsync
Summary: The config turns on fsync for all indexedlog writes. It can be useful in places where we want reliability more than performance with unknown kernel issues. Reviewed By: sfilipco Differential Revision: D27347595 fbshipit-source-id: c0b31928684e8805a9e6441062f96b05ad311ea2
This commit is contained in:
parent
c12d660aee
commit
880f7a6b4c
@ -136,6 +136,9 @@ fn initialize_indexedlog(config: &ConfigSet) -> Result<()> {
|
||||
indexedlog::utils::SYMLINK_ATOMIC_WRITE.store(use_symlink_atomic_write, SeqCst);
|
||||
}
|
||||
|
||||
let fsync: bool = config.get_or_default("storage", "indexedlog-fsync")?;
|
||||
indexedlog::utils::set_global_fsync(fsync);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user