Show SlowDown error message if backend is busy (#7521)

or if there are too many open file descriptors.
This commit is contained in:
poornas
2019-05-02 07:09:57 -07:00
committed by kannappanr
parent 64998fc4ab
commit cf2a436bc8
8 changed files with 55 additions and 3 deletions

View File

@@ -57,6 +57,8 @@ func toObjectErr(err error, params ...string) error {
}
case errDiskFull:
err = StorageFull{}
case errTooManyOpenFiles:
err = SlowDown{}
case errFileAccessDenied:
if len(params) >= 2 {
err = PrefixAccessDenied{
@@ -137,6 +139,13 @@ func (e StorageFull) Error() string {
return "Storage reached its minimum free disk threshold."
}
// SlowDown too many file descriptors open or backend busy .
type SlowDown struct{}
func (e SlowDown) Error() string {
return "Please reduce your request rate"
}
// InsufficientReadQuorum storage cannot satisfy quorum for read operation.
type InsufficientReadQuorum struct{}