storj/satellite/orders
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
..
encryptionkey_test.go satellite/orders: add factory function to encryption key 2020-11-20 11:40:15 -08:00
encryptionkey.go satellite/orders: use smaller encrypted metadata 2021-01-08 16:40:31 +00:00
endpoint_test.go satellite/metabase: move package one level higher 2021-04-21 15:54:22 +03:00
endpoint.go satellite/orders: cleanup after altering primary key 2023-03-06 16:03:11 +00:00
mock_test.go satellite: move satellite/nodeselection/uploadselection => satellite/nodeselection 2023-07-07 10:32:03 +02:00
orders_test.go satellites/orders: populate egress_dead in project_bandwidth_daily_rollups 2021-10-06 16:54:49 +00:00
rollups_chore.go satellite/orders: Flush all pending bandwidth rollup writes on shutdown 2020-01-23 08:12:41 -07:00
rollups_write_cache_test.go satellite/orders: ignore context canceled when updating bucket bandwidth 2023-02-08 13:21:42 +00:00
rollups_write_cache.go satellite/orders: don't cancel flushing bandwidth orders 2023-03-01 17:10:05 +00:00
service_integration_test.go satellite/metainfo: support desired node number for download object/segment 2023-02-13 13:57:48 +00:00
service_test.go satellite/overlay: fix placement selection config parsing 2023-09-21 14:31:41 +00:00
service.go satellite/repair: unify repair logic 2023-09-25 09:42:08 -05:00
signer_test.go satellite/overlay: return noise info with selected nodes 2023-02-02 15:46:27 +00:00
signer.go satellite/overlay: return noise info with selected nodes 2023-02-02 15:46:27 +00:00
window_endpoint_phase.go satellite/orders: 3-phase rollout 2020-08-03 17:01:42 +00:00