Drop the plan state from the store and the assignments: migration 0108 and placement-only assignments (release 6, issue 1945 B9, B4)
This commit is contained in:
@@ -449,17 +449,6 @@ func (e Enrolment) Heard(ctx context.Context, report Report) (news bool, err err
|
||||
if err := e.Inventory.RecordReadsEpoch(ctx, node.ID, report.ReadsEpoch()); err != nil {
|
||||
return false, err
|
||||
}
|
||||
// And whether it reads a generation (novox/hq issue 234), the same way: only from a node-engine that
|
||||
// orders its reports, so a one-shot report (a rekey) does not say an engine stopped reading one.
|
||||
if report.Ordered() {
|
||||
if err := e.Inventory.RecordReadsGeneration(ctx, node.ID, report.ReadsGeneration); err != nil {
|
||||
return false, err
|
||||
}
|
||||
// And whether it reads a module per resource and a build per module (novox/hq issue 1145), the same way.
|
||||
if err := e.Inventory.RecordReadsModules(ctx, node.ID, report.ReadsModules); err != nil {
|
||||
return false, err
|
||||
}
|
||||
}
|
||||
if report.Ordered() {
|
||||
account := AccountOf(report)
|
||||
news, err = e.Inventory.RecordOrderedDoing(ctx, node.ID, doing,
|
||||
@@ -496,27 +485,6 @@ func (e Enrolment) Heard(ctx context.Context, report Report) (news bool, err err
|
||||
return false, err
|
||||
}
|
||||
}
|
||||
// And how long the machine took, from the send to this first account of it (novox/hq to-be 45
|
||||
// Phase 0): what the sent-not-reported bound will be set from. Said if lost, never a failure.
|
||||
//
|
||||
// **A wait for a busy container is its own measure** (novox/hq ADR 0335): the first report that says one
|
||||
// waits is the machine's answer, kept as its apply with the detail ApplyBusy; the report that says the
|
||||
// container replaced ends the wait, kept as a `busy-wait` of the same send — so the apply's time holds no
|
||||
// busy time, and the walk reads the machine as answered and waiting, never as silent.
|
||||
outcome := doing.Outcome
|
||||
if doing.Waiting() {
|
||||
outcome = inventory.ApplyBusy
|
||||
log.Printf("%s applied declaration %s and leaves a busy container running until it says idle: %s",
|
||||
report.Node, short(report.Declared), busyWords(doing.Busy))
|
||||
} else if replacedAfterWaiting(doing.Busy) {
|
||||
if err := e.Inventory.RecordBusyDuration(ctx, report.Node, report.Declared); err != nil {
|
||||
log.Printf("how long %s waited for a busy container could not be recorded: %v", report.Node, err)
|
||||
}
|
||||
}
|
||||
if err := e.Inventory.RecordApplyDuration(ctx, report.Node, report.Declared, outcome); err != nil {
|
||||
log.Printf("how long %s took to apply could not be recorded: %v", report.Node, err)
|
||||
}
|
||||
|
||||
// A refusal, a failure, or a bare word that the node is there — none of them is an account of
|
||||
// what the machine holds, so each moves last_seen and nothing else. Recording a partial list
|
||||
// as though it were the whole would tell a rebuilding node to remove what it still has.
|
||||
|
||||
Reference in New Issue
Block a user