Skip to content

Commit

Permalink
Merge pull request #1883 from tursodatabase/fix_interval_checkpoint
Browse files Browse the repository at this point in the history
periodic checkpoint: Don't checkpoint at startup
  • Loading branch information
penberg authored Dec 16, 2024
2 parents f8954db + 163e369 commit 21861a6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libsql-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,8 @@ where
tracing::info!("setting checkpoint interval to {:?}", period);
let mut interval = interval(period);
interval.set_missed_tick_behavior(MissedTickBehavior::Delay);
// Make sure that we don't checkpoint immediately after startup
interval.tick().await;
let mut retry: Option<Duration> = None;
loop {
if let Some(retry) = retry.take() {
Expand Down

0 comments on commit 21861a6

Please sign in to comment.