14388: Don't prefer positions that are only temporarily untrashable.
authorTom Clegg <tclegg@veritasgenetics.com>
Tue, 23 Oct 2018 18:30:42 +0000 (14:30 -0400)
committerTom Clegg <tclegg@veritasgenetics.com>
Tue, 23 Oct 2018 18:30:42 +0000 (14:30 -0400)
commite38d51d61fb25e5d5c7eb682f3750d44456b0620
tree75de37cca58d0060000e63596c5a258d67ae5807
parent33af4962460b99718e26e9c22b6e8cae1a19d253
14388: Don't prefer positions that are only temporarily untrashable.

If old copies exist in the preferred positions, and a new copy is
written to a worse position, keep the old copies and wait for the new
copy to become eligible for trash.

Previously, an old copy would be deleted. This would bring replication
down to the desired level in the short term, but would also cause
extra pulling/copying in the future to restore the optimal copy, and
introduce extra probes for all clients in the meantime.

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg@veritasgenetics.com>
services/keep-balance/balance.go
services/keep-balance/balance_test.go