Skip sync safekeepers (draft)

This commit is contained in:
Bojan Serafimov
2023-07-24 07:52:36 -04:00
parent 8d0f4a7857
commit 2f7c2b9826

View File

@@ -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
}