Skip to content

Commit 9322d67

Browse files
committed
force flush trigger when shutdown gracefully
1 parent 5efdbd3 commit 9322d67

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

bottomless/src/replicator.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,10 @@ impl Replicator {
528528
tracing::info!("bottomless replicator: shutting down...");
529529
// 1. wait for all committed WAL frames to be committed locally
530530
let last_frame_no = self.last_known_frame();
531+
// force flush in order to not wait for periodic wake up of local back up process
532+
if let Some(tx) = &self.flush_trigger {
533+
let _ = tx.send(());
534+
}
531535
self.wait_until_committed(last_frame_no).await?;
532536
// 2. wait for snapshot upload to S3 to finish
533537
self.wait_until_snapshotted().await?;

0 commit comments

Comments
 (0)