Add server pool reserved space (#14974)

If one or more pools reach 85% usage in a set, we will only 
use pools that have more free space.

In case all pools are above 85% we allow all of them to be used 
with the regular distribution.
This commit is contained in:
Klaus Post
2022-05-25 13:20:20 -07:00
committed by GitHub
parent d8101573be
commit a4be0b88f6
2 changed files with 47 additions and 4 deletions

View File

@@ -113,6 +113,10 @@ const (
// diskFillFraction is the fraction of a disk we allow to be filled.
diskFillFraction = 0.99
// diskReserveFraction is the fraction of a disk where we will fill other server pools first.
// If all pools reach this, we will use all pools with regular placement.
diskReserveFraction = 0.15
// diskAssumeUnknownSize is the size to assume when an unknown size upload is requested.
diskAssumeUnknownSize = 1 << 30