mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
fix: speedtest should exit upon errors cleanly (#13851)
- deleteBucket() should be called for cleanup if client abruptly disconnects - out of disk errors should be sent to client properly and also cancel the calls - limit concurrency to available MAXPROCS not 32 for auto-tuned setup, if procs are beyond 32 then continue normally. this is to handle smaller setups. fixes #13834
This commit is contained in:
18
cmd/utils.go
18
cmd/utils.go
@@ -1078,10 +1078,7 @@ func speedTest(ctx context.Context, opts speedTestOpts) chan madmin.SpeedTestRes
|
||||
break
|
||||
}
|
||||
|
||||
doBreak := false
|
||||
if float64(totalGet-throughputHighestGet)/float64(totalGet) < 0.025 {
|
||||
doBreak = true
|
||||
}
|
||||
doBreak := float64(totalGet-throughputHighestGet)/float64(totalGet) < 0.025
|
||||
|
||||
throughputHighestGet = totalGet
|
||||
throughputHighestResults = results
|
||||
@@ -1092,12 +1089,19 @@ func speedTest(ctx context.Context, opts speedTestOpts) chan madmin.SpeedTestRes
|
||||
break
|
||||
}
|
||||
|
||||
if !opts.autotune {
|
||||
sendResult()
|
||||
break
|
||||
for _, result := range results {
|
||||
if result.Error != "" {
|
||||
// Break out on errors.
|
||||
sendResult()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
sendResult()
|
||||
if !opts.autotune {
|
||||
break
|
||||
}
|
||||
|
||||
// Try with a higher concurrency to see if we get better throughput
|
||||
concurrency += (concurrency + 1) / 2
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user