storj/cmd
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
..
certificates certificate/authorization,cmd/certificates: remove gob code 2023-02-08 15:05:40 +00:00
crashcollect crashcollect: process for receiving panics 2021-04-27 18:57:47 +03:00
identity all: fix deprecated ioutil commands 2022-10-11 15:27:29 +00:00
internal/wizard cmd/internal/asset: delete unused code 2021-05-20 18:30:19 +03:00
metric-receiver cmd/metric-receiver: restore minimal metrics server 2020-10-14 20:01:29 +03:00
multinode cmd/multinode: Removes dependency on deprecated identity-dir flag, code and documentation. (#5646) 2023-03-08 13:56:15 +01:00
satellite satellite/repair: unify repair logic 2023-09-25 09:42:08 -05:00
storagenode cmd/storagenode: add forget-satellite subcommand 2023-09-13 19:06:55 +00:00
storagenode-updater cmd/storagenode-updater: restart storagenode after update on BSD unix derivatives 2023-01-11 12:38:26 +00:00
storj-admin all: fix linter complaints 2020-10-13 15:59:01 +03:00
storj-sim cmd,satellite: remove Graphql code and dependencies 2023-08-22 12:23:14 +00:00
tools satellite/overlay: fix placement selection config parsing 2023-09-21 14:31:41 +00:00
uplink cmd/uplink: don't output stacktrace with unknown access 2023-09-20 10:06:47 +00:00
versioncontrol Dockerfiles: switch base image from alpine to Debian 2022-04-05 11:40:44 +00:00