fix: retain complete histories with bounded journal capacity and native recovery
Rust development slice / linux (push) Failing after 6s
Rust development slice / linux (push) Failing after 6s
This commit is contained in:
@@ -209,6 +209,29 @@ impl<C: reconcile::SyncClock> Agent<C> {
|
||||
tx.commit()?;
|
||||
Ok(())
|
||||
}
|
||||
/// New process only. Persist honest uncertainty before any helper snapshot
|
||||
/// can block; the ordinary first-channel replay publishes it before Sync.
|
||||
fn recover_interrupted(&mut self) -> Result<()> {
|
||||
let Some(binding) = &self.binding else {
|
||||
return Ok(());
|
||||
};
|
||||
let interrupted = jobs::interrupted(&self.db, &self.ledger, binding)?;
|
||||
for (offer, grant) in interrupted {
|
||||
if grant.is_empty() {
|
||||
jobs::interrupted_request(&self.db, &offer)?;
|
||||
} else {
|
||||
self.record(
|
||||
0,
|
||||
&offer,
|
||||
&grant,
|
||||
rmm_privileged_helper::Outcome::unknown("AGENT_PROCESS_INTERRUPTED"),
|
||||
)?;
|
||||
}
|
||||
}
|
||||
// No finish/unlock here. Only normal bound reconciliation can release
|
||||
// a consumed attempt once independent definitive evidence is available.
|
||||
Ok(())
|
||||
}
|
||||
async fn replay(&mut self, ws: &wire_channel::Handle, generation: u64) -> Result<()> {
|
||||
// A large replay backlog must not monopolize heartbeat/cancel handling.
|
||||
// On backpressure timeout, discard this channel rather than continuing
|
||||
@@ -789,6 +812,7 @@ async fn main() -> Result<()> {
|
||||
certificates,
|
||||
rotation_policy,
|
||||
};
|
||||
agent.recover_interrupted()?;
|
||||
let mut backoff = 1_u64;
|
||||
loop {
|
||||
let started = Instant::now();
|
||||
|
||||
Reference in New Issue
Block a user