H-A-180: judge a restore point's hold again at the start and on placement changes
A module held because the recovery module could not be asked kept that hold across the engine's start as if it waited for the operator's answer, while its have carried a wait, so the assigner never raised that ask: the hold was for good (the indexer on the control-node). The engine now judges such a hold again at its start and at every change of the placements: with no holder of mesh-recovery placed it moves the module without a point (H-A-177), with one placed it asks the point once more. A point a holder answered and failed is held as a failed backup, with no wait, so the assigner raises the operator's ask (back up again or skip); an older hold of that kind written with a wait is written again without one at the start. Builds: design 47 H-A-180, H-A-177, ADR 0568 §4, G-14 (a snapshot-kept that ends failed holds as a failed backup), A-453
This commit is contained in:
@@ -261,6 +261,8 @@ func TestTheNodeComposesItsWantsFromTheBus(t *testing.T) {
|
||||
var composed atomic.Int64 // passes made: each reads what runs once
|
||||
env.Running = func() []compositions.Composed { composed.Add(1); return nil }
|
||||
c := New(env)
|
||||
var placements atomic.Int64 // H-A-180: each assignment taken in is told, so the agent judges a recovery hold again
|
||||
c.OnPlacements = func() { placements.Add(1) }
|
||||
out, err := c.Watch(ctx, "n1.>")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -301,6 +303,9 @@ func TestTheNodeComposesItsWantsFromTheBus(t *testing.T) {
|
||||
if placed, read := c.RecoveryPlaced(); !read || placed {
|
||||
t.Errorf("once the assignments are caught up RecoveryPlaced answers placed %v read %v, want read with no holder", placed, read)
|
||||
}
|
||||
if placements.Load() == 0 {
|
||||
t.Error("the assignment taken in was not told to OnPlacements (H-A-180)")
|
||||
}
|
||||
break
|
||||
}
|
||||
c, err := compositions.Decode(u.Value)
|
||||
|
||||
Reference in New Issue
Block a user