1b8bd6c082
The repair checker and repair worker both need to determine which pieces are healthy, which are retrievable, and which should be replaced, but they have been doing it in different ways in different code, which has been the cause of bugs. The same term could have very similar but subtly different meanings between the two, causing much confusion. With this change, the piece- and node-classification logic is consolidated into one place within the satellite/repair package, so that both subsystems can use it. This ought to make decision-making code more concise and more readable. The consolidated classification logic has been expanded to create more sets, so that the decision-making code does not need to do as much precalculation. It should now be clearer in comments and code that a piece can belong to multiple sets arbitrarily (except where the definition of the sets makes this logically impossible), and what the precise meaning of each set is. These sets include Missing, Suspended, Clumped, OutOfPlacement, InExcludedCountry, ForcingRepair, UnhealthyRetrievable, Unhealthy, Retrievable, and Healthy. Some other side effects of this change: * CreatePutRepairOrderLimits no longer needs to special-case excluded countries; it can just create as many order limits as requested (by way of len(newNodes)). * The repair checker will now queue a segment for repair when there are any pieces out of placement. The code calls this "forcing a repair". * The checker.ReliabilityCache is now accessed by way of a GetNodes() function similar to the one on the overlay. The classification methods like MissingPieces(), OutOfPlacementPieces(), and PiecesNodesLastNetsInOrder() are removed in favor of the classification logic in satellite/repair/classification.go. This means the reliability cache no longer needs access to the placement rules or excluded countries list. Change-Id: I105109fb94ee126952f07d747c6e11131164fadb |
||
---|---|---|
.. | ||
abtesting | ||
accounting | ||
admin | ||
analytics | ||
attribution | ||
audit | ||
buckets | ||
compensation | ||
console | ||
contact | ||
gc | ||
geoip | ||
gracefulexit | ||
internalpb | ||
mailservice | ||
metabase | ||
metainfo | ||
metrics | ||
nodeapiversion | ||
nodeevents | ||
nodeselection | ||
nodestats | ||
oidc | ||
orders | ||
overlay | ||
payments | ||
repair | ||
reputation | ||
revocation | ||
satellitedb | ||
snopayouts | ||
admin.go | ||
api_test.go | ||
api.go | ||
auditor.go | ||
configlock_test.go | ||
core.go | ||
gc-bf_test.go | ||
gc-bf.go | ||
gc.go | ||
peer.go | ||
rangedloop.go | ||
repairer.go | ||
ui.go |