From 2f7c2b9826d8253bd104cbde8cf44e6ef25d4425 Mon Sep 17 00:00:00 2001 From: Bojan Serafimov Date: Mon, 24 Jul 2023 07:52:36 -0400 Subject: [PATCH] Skip sync safekeepers (draft) --- compute_tools/src/compute.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compute_tools/src/compute.rs b/compute_tools/src/compute.rs index b33f4f05dd..fb4c6ee5f7 100644 --- a/compute_tools/src/compute.rs +++ b/compute_tools/src/compute.rs @@ -372,9 +372,13 @@ impl ComputeNode { let lsn = match spec.mode { ComputeMode::Primary => { info!("starting safekeepers syncing"); - let lsn = self + let lsn = if let Some(lsn) = self.check_safekeepers_synced() { + lsn + } else { + self .sync_safekeepers(pspec.storage_auth_token.clone()) .with_context(|| "failed to sync safekeepers")?; + }; info!("safekeepers synced at LSN {}", lsn); lsn }