H2 H-A-504: the node-engine orders wants by the want key's bus revision
The engine refused a want whose run was not newer than the run it applied,
so wants written with a revision number as their run held every later
want back ("the want of mesh-delivery-indexer carries run 288, and the
engine applied it from run 323"). The bus orders the writes of one key:
the engine now keeps the want revision it applied in the have (beside the
run, the seat's form 5) and refuses only an older revision; the same
revision goes on to the checks that already stop a needless apply, so
Reconcile and a recomposition still apply. The run is information.
Builds: design 47 H2 §813 (1); H-A-504 third addendum, H-A-504 fourth addendum, H-A-504 fifth addendum
This commit is contained in:
@@ -115,7 +115,8 @@ func (h sessionHaves) ReadAt(ctx context.Context, module string) (agent.Have, ui
|
||||
return agent.Have{}, revision, false, err
|
||||
}
|
||||
return agent.Have{Module: module, FP: got.Fp, Composed: got.Composed, Phase: string(got.Phase), Detail: got.Detail,
|
||||
Sealed: got.SealedAt, Wait: got.Wait, Run: got.Run, Pipeline: got.Pipeline}, revision, true, nil
|
||||
Sealed: got.SealedAt, Wait: got.Wait, Run: got.Run, Pipeline: got.Pipeline,
|
||||
WantRevision: uint64(max(got.WantRevision, 0))}, revision, true, nil
|
||||
}
|
||||
|
||||
// WriteAt writes a module's have only while its key is at the revision read (agent.HavesAt, H-A-480).
|
||||
@@ -142,7 +143,8 @@ func moduleFact(x agent.Have) link.ModuleFact {
|
||||
}
|
||||
return link.ModuleFact{Module: x.Module, FP: x.FP, Composed: x.Composed, Phase: phase,
|
||||
Failed: phase == string(nodeengineclient.PhaseFailed), Detail: shorten(x.Detail), Judgement: x.Judgement, Waits: x.Waits,
|
||||
BuildAlone: x.BuildAlone, Kept: x.Kept, Sealed: x.Sealed, PullWait: x.PullWait, Wait: x.Wait, Run: x.Run, Pipeline: x.Pipeline}
|
||||
BuildAlone: x.BuildAlone, Kept: x.Kept, Sealed: x.Sealed, PullWait: x.PullWait, Wait: x.Wait, Run: x.Run, Pipeline: x.Pipeline,
|
||||
WantRevision: x.WantRevision}
|
||||
}
|
||||
|
||||
func (h sessionHaves) Removed(ctx context.Context, module string) {
|
||||
|
||||
Reference in New Issue
Block a user