mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
allow service freeze/unfreeze on a setup (#13707)
an active running speedTest will reject all new S3 requests to the server, until speedTest is complete. this is to ensure that speedTest results are accurate and trusted. Co-authored-by: Klaus Post <klauspost@gmail.com>
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/minio/console/restapi"
|
||||
@@ -325,6 +326,13 @@ var (
|
||||
|
||||
globalConsoleSrv *restapi.Server
|
||||
|
||||
// handles service freeze or un-freeze S3 API calls.
|
||||
globalServiceFreeze atomic.Value
|
||||
|
||||
// Only needed for tracking
|
||||
globalServiceFreezeCnt int32
|
||||
globalServiceFreezeMu sync.Mutex // Updates.
|
||||
|
||||
// Add new variable global values here.
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user