storj/satellite/repair/queue
Cameron Ayer c2525ba2b5 satellite/{repair,satellitedb}: clean up healthy segments from repair queue at end of checker iteration
Repair workers prioritize the most unhealthy segments. This has the consequence that when we
finally begin to reach the end of the queue, a good portion of the remaining segments are
healthy again as their nodes have come back online. This makes it appear that there are more
injured segments than there actually are.

solution:
Any time the checker observes an injured segment it inserts it into the repair queue or
updates it if it already exists. Therefore, we can determine which segments are no longer
injured if they were not inserted or updated by the last checker iteration. To do this we
add a new column to the injured segments table, updated_at, which is set to the current time
when a segment is inserted or updated. At the end of the checker iteration, we can delete any
items where updated_at < checker start.

Change-Id: I76a98487a4a845fab2fbc677638a732a95057a94
2020-09-29 20:38:22 +00:00
..
common.go rename all the things (#2531) 2019-07-28 08:55:36 +03:00
queue2_test.go satellite: fix string(int) conversions 2020-06-12 06:41:34 +00:00
queue_test.go satellite/{repair,satellitedb}: clean up healthy segments from repair queue at end of checker iteration 2020-09-29 20:38:22 +00:00
queue.go satellite/{repair,satellitedb}: clean up healthy segments from repair queue at end of checker iteration 2020-09-29 20:38:22 +00:00