mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 06:47:41 +03:00
zstore: indexedlog open => open_with_repair
Summary: See previous diffs for context. Reviewed By: DurhamG Differential Revision: D33109473 fbshipit-source-id: d928bcd6edb0bf5087f98329f8aa3a9e923b9e9f
This commit is contained in:
parent
ab83a58cf9
commit
ba0ec6c7ae
@ -16,6 +16,7 @@ use std::path::PathBuf;
|
||||
|
||||
use indexedlog::log as ilog;
|
||||
use indexedlog::DefaultOpenOptions;
|
||||
use indexedlog::OpenWithRepair;
|
||||
use lazy_static::lazy_static;
|
||||
use lru_cache::LruCache;
|
||||
use minibytes::Bytes;
|
||||
@ -95,7 +96,7 @@ impl OpenOptions {
|
||||
|
||||
/// Load or create [`Zstore`] at the given directory.
|
||||
pub fn open(&self, dir: &Path) -> crate::Result<Zstore> {
|
||||
let log = Zstore::default_open_options().open(dir)?;
|
||||
let log = Zstore::default_open_options().open_with_repair(dir)?;
|
||||
// The cache_size should be greater than len(metalog.keys()))
|
||||
Ok(Zstore {
|
||||
dir: dir.to_path_buf(),
|
||||
|
Loading…
Reference in New Issue
Block a user