Files
tuwunel/src/database/engine/repair.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
392 B
Rust
Raw Normal View History

use std::path::PathBuf;
use conduwuit::{Err, Result, info, warn};
use rocksdb::Options;
use super::Db;
pub(crate) fn repair(db_opts: &Options, path: &PathBuf) -> Result {
warn!("Starting database repair. This may take a long time...");
match Db::repair(db_opts, path) {
| Ok(()) => info!("Database repair successful."),
| Err(e) => return Err!("Repair failed: {e:?}"),
}
Ok(())
}