mesh-delivery-pipeline: remove Unfinished.HeldBehind, which nothing calls (fix-770 round 3, issue 1984)
The finding pipeline-failed reads its held-behind list from pipeline.HeldBehind, which reads the head; Unfinished.HeldBehind was left with no caller (principle 7). Builds: design 47 H2 H-A-770 (4)
This commit is contained in:
@@ -448,35 +448,6 @@ func (u *Unfinished) heldBack(branch, module string, e UnfinishedEntry, head map
|
||||
return by, passed, p
|
||||
}
|
||||
|
||||
// HeldBehind are the modules whose unfinished key of branch is tied to module (H-A-625 (2)): the movers a failed module holds
|
||||
// back, said by its finding pipeline-failed.
|
||||
func (u *Unfinished) HeldBehind(branch, module string) []string {
|
||||
if u == nil {
|
||||
return nil
|
||||
}
|
||||
ukeys, err := u.Store.Keys(keys.EscapeName(branch) + ".*")
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
slices.Sort(ukeys)
|
||||
var out []string
|
||||
for _, key := range ukeys {
|
||||
_, name, _ := strings.Cut(key, ".")
|
||||
m, err := keys.UnescapeName(name)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
e, held, _ := u.read(key)
|
||||
if !held {
|
||||
continue
|
||||
}
|
||||
if by, _, _ := u.heldBack(branch, m, e, nil); slices.Contains(by, module) {
|
||||
out = append(out, m)
|
||||
}
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// Carry adds to the movers of a catalog revision of branch each unfinished mover whose fingerprint is still its entry's in
|
||||
// entries, the revision's entries, with one journal line per mover added again (§786). An unfinished mover the revision
|
||||
// moves at a newer fingerprint, or whose entry holds another fingerprint or none, has its key deleted; one it moves at its
|
||||
|
||||
Reference in New Issue
Block a user