diff options
| -rw-r--r-- | src/bootstrap.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bootstrap.rs b/src/bootstrap.rs index 470ca67..d3ac94d 100644 --- a/src/bootstrap.rs +++ b/src/bootstrap.rs @@ -52,7 +52,9 @@ pub(crate) async fn bootstrap(state: &AppState, seeds: &[String]) -> Result<()> let deadline = tokio::time::Instant::now() + BOOTSTRAP_TIMEOUT; loop { if let Some(cluster_id) = state.cluster_id().await { - if state.initial_sync_done.load(Ordering::Acquire) { + // A node joining a compacted cluster rejoins the newer epoch first; it is + // ready only once that rejoin verified the epoch. + if state.initial_sync_done.load(Ordering::Acquire) && !state.compaction.is_rejoining() { state.mark_ready(cluster_id.clone()).await?; info!(cluster_id = %cluster_id, "Node is ready"); return Ok(()); |
