Skip to content

Commit

Permalink
feat: skip redundant bootstrap in overriding init (#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega authored Oct 17, 2024
1 parent 0e26238 commit 86b775e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/bin/dolos/bootstrap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ pub struct Args {
}

pub fn run(config: &crate::Config, args: &Args, feedback: &Feedback) -> miette::Result<()> {
let wal = crate::common::open_wal(config)?;

if !wal.is_empty().into_diagnostic()? {
println!("found existing data, skipping bootstrap");
return Ok(());
}

let command = match args.command.clone() {
Some(x) => x,
None => Command::inquire()?,
Expand Down

0 comments on commit 86b775e

Please sign in to comment.