refactor database engine/options; add column descriptors
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
16
src/database/engine/repair.rs
Normal file
16
src/database/engine/repair.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use conduwuit::{info, warn, Err, Result};
|
||||
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(())
|
||||
}
|
||||
Reference in New Issue
Block a user