huskies: merge 1116 story rebuild_and_restart loses pending CRDT ops by calling exec() before persistence channel drains
This commit is contained in:
@@ -189,6 +189,11 @@ pub async fn rebuild_and_restart(
|
||||
n.notify(ShutdownReason::Rebuild).await;
|
||||
}
|
||||
|
||||
// 5b. Drain the persistence channel so no queued ops are lost when exec()
|
||||
// replaces this process. Times out after 5 s with a logged warning
|
||||
// naming the queue depth so any regression is visible in logs.
|
||||
crate::crdt_state::flush_persistence(std::time::Duration::from_secs(5)).await;
|
||||
|
||||
// 6. Re-exec with the new binary.
|
||||
// Use the cargo output path rather than current_exe() so that rebuilds
|
||||
// inside Docker work correctly — the running binary may be installed at
|
||||
|
||||
Reference in New Issue
Block a user