storj/satellite/audit
paul cannon 1b8bd6c082 satellite/repair: unify repair logic
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
2023-09-25 09:42:08 -05:00
..
audit_test.go satellite/metainfo: remove ServerSideCopyDuplicateMetadata 2023-08-08 12:15:10 +00:00
common_test.go satellite/audit: remove segments loop parts 2023-04-24 15:52:11 +00:00
containment_test.go satellite/audit: test delay before Reverify 2023-02-15 23:16:23 +00:00
containment.go satellite/audit: add GetAllContainedNodes method to ReverifyQueue 2023-02-02 00:39:29 +00:00
cryptosource.go all: fix dots 2020-07-16 14:58:28 +00:00
disqualification_test.go satellite/audit: remove pieces when audits fail 2023-06-22 14:19:00 +00:00
getshare_test.go satellite/audit: improve error handling 2023-05-11 22:55:26 +00:00
integration_test.go satellite/audit: remove segments loop parts 2023-04-24 15:52:11 +00:00
observer_test.go satellite/metabase/rangedloop: move Segment definition 2023-05-16 12:37:17 +00:00
observer.go satellite/metabase/rangedloop: move Segment definition 2023-05-16 12:37:17 +00:00
pieces_test.go satellite/repair: update audit records during repair 2021-09-24 00:48:13 +00:00
pieces.go satellite/repair: move over audit.Pieces 2022-09-22 16:43:03 +00:00
queue.go satellite/audit: add GetAllContainedNodes method to ReverifyQueue 2023-02-02 00:39:29 +00:00
reporter_test.go satellite/audit: remove pieces when audits fail 2023-06-22 14:19:00 +00:00
reporter.go satellite/audit: remove pieces when audits fail 2023-06-22 14:19:00 +00:00
reservoir_test.go satellite/metabase/rangedloop: move Segment definition 2023-05-16 12:37:17 +00:00
reservoir.go satellite/metabase/rangedloop: move Segment definition 2023-05-16 12:37:17 +00:00
reverifier_test.go satellite/audit: remove segments loop parts 2023-04-24 15:52:11 +00:00
reverifier.go satellite/metabase: add piece size calculation to segment 2023-02-22 11:04:02 +00:00
reverify_chore_test.go satellite/audit: add ContainmentSyncChore 2023-02-07 01:18:49 +00:00
reverify_chore.go satellite/audit: add ContainmentSyncChore 2023-02-07 01:18:49 +00:00
reverify_test.go satellite/audit: remove segments loop parts 2023-04-24 15:52:11 +00:00
reverifyworker.go satellite/audit: add audit.ReverifyWorker 2022-12-12 11:57:08 +00:00
verifier_test.go satellite/repair: unify repair logic 2023-09-25 09:42:08 -05:00
verifier_unit_test.go satellite/audit: Begin using piecewise reverifications 2022-12-16 14:21:13 +00:00
verifier.go satellite/audit: remove pieces when audits fail 2023-06-22 14:19:00 +00:00
worker.go satellite/audit: remove segments loop parts 2023-04-24 15:52:11 +00:00