Skip to content

Commit

Permalink
fix: execute wal pruning after a few blocks (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega committed May 17, 2024
1 parent eafa7d9 commit 7b5fc07
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/sync/roll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,12 @@ impl gasket::framework::Worker<Stage> for Worker {
.await
.or_panic()?;

// TODO: don't do this while doing full sync
//stage.store.prune_wal().or_panic()?;
// TODO: define a better strategy for pruning schedule
if let Some(x) = &self.last_seq_chain {
if x % 100 == 0 {
stage.store.prune_wal().or_panic()?;
}
}

Ok(())
}
Expand Down

0 comments on commit 7b5fc07

Please sign in to comment.