Skip to content

Commit ab1cc55

Browse files
committed
[leader] retry guardian reconcile on failure, not just epoch change
Clearing last_guardian_reconcile_epoch when the reconcile task errors keeps the original behavior of retrying a failed handoff on the next checkpoint (e.g. transient guardian downtime), while a successful reconcile still holds the gate until the hashi epoch advances.
1 parent 2e4979b commit ab1cc55

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

crates/hashi/src/leader/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,12 @@ impl LeaderService {
251251
}
252252
Some(result) = OptionFuture::from(self.guardian_committee_reconcile_task.as_mut()) => {
253253
self.guardian_committee_reconcile_task = None;
254+
// On failure, clear the epoch gate so the next tick retries
255+
// (e.g. transient guardian downtime); success holds the gate
256+
// until the hashi epoch advances again.
257+
if !matches!(&result, Ok(Ok(()))) {
258+
self.last_guardian_reconcile_epoch = None;
259+
}
254260
Self::log_task_result("guardian_committee_reconcile", result);
255261
}
256262

0 commit comments

Comments
 (0)