auto-update: a rebuild is live until its whole subtree is terminal
rebuild_live checked only MetaSync, which finishes in 0.2 s, so the next 5-min pass queued a second rebuild while the first still held the stop, swap and start. It now covers MetaSync, AgentWindow, Prebuild, StopForUpdate, Swap and RebuildBookkeeping. AgentWindow is also the brace of a pause window, so an open pause skips that agent's pass too; the docs say so and a test pins it.
This commit is contained in:
parent
36515c289d
commit
12e797e7e3
1 changed files with 66 additions and 7 deletions
|
|
@ -1556,6 +1556,18 @@ fn a_rebuild_is_live_for_its_own_agent_only() {
|
|||
assert!(!q.rebuild_live("bob"));
|
||||
}
|
||||
|
||||
/// An open pause window declares an `AgentWindow`, so it also holds the agent
|
||||
/// live for the auto-update pass.
|
||||
#[test]
|
||||
fn a_pause_window_counts_as_a_live_rebuild() {
|
||||
let q = JobQueue::new(1);
|
||||
assert!(!q.rebuild_live("alice"), "control: nothing queued yet");
|
||||
q.insert_job(|b| vec![templates::pause_quiesce(b, "alice").guid()])
|
||||
.expect("insert");
|
||||
assert!(q.rebuild_live("alice"));
|
||||
assert!(!q.rebuild_live("bob"));
|
||||
}
|
||||
|
||||
/// The periodic reconcile tick queues one lone `Reconcile` on the agent's lease
|
||||
/// and nothing for an agent any live node already targets — whichever kind
|
||||
/// of work it is — while other agents and finished work do not block it.
|
||||
|
|
|
|||
Loading…
Reference in a new issue