mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
Deprecate and remove configurable disk usage check (#6016)
This commit is contained in:
committed by
kannappanr
parent
eafc15cd47
commit
3143454982
@@ -21,7 +21,6 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/minio/minio/cmd/logger"
|
||||
|
||||
@@ -105,17 +104,6 @@ func (s *serverConfig) GetBrowser() bool {
|
||||
return bool(s.Browser)
|
||||
}
|
||||
|
||||
// Set new usage configuration, currently only supports configuring
|
||||
// usage check interval.
|
||||
func (s *serverConfig) SetUsageConfig(checkUsageInterval time.Duration) {
|
||||
s.Usage = usageConfig{checkUsageInterval}
|
||||
}
|
||||
|
||||
// Get current usage configuration.
|
||||
func (s *serverConfig) GetUsageConfig() usageConfig {
|
||||
return s.Usage
|
||||
}
|
||||
|
||||
// SetCacheConfig sets the current cache config
|
||||
func (s *serverConfig) SetCacheConfig(drives, exclude []string, expiry int) {
|
||||
s.Cache.Drives = drives
|
||||
@@ -153,8 +141,6 @@ func (s *serverConfig) ConfigDiff(t *serverConfig) string {
|
||||
return "StorageClass configuration differs"
|
||||
case !reflect.DeepEqual(s.Cache, t.Cache):
|
||||
return "Cache configuration differs"
|
||||
case !reflect.DeepEqual(s.Usage, t.Usage):
|
||||
return "Usage configuration differs"
|
||||
case !reflect.DeepEqual(s.Notify.AMQP, t.Notify.AMQP):
|
||||
return "AMQP Notification configuration differs"
|
||||
case !reflect.DeepEqual(s.Notify.NATS, t.Notify.NATS):
|
||||
@@ -200,7 +186,6 @@ func newServerConfig() *serverConfig {
|
||||
Exclude: []string{},
|
||||
Expiry: globalCacheExpiry,
|
||||
},
|
||||
Usage: usageConfig{globalDefaultUsageCheckInterval},
|
||||
Notify: notifier{},
|
||||
}
|
||||
|
||||
@@ -261,10 +246,6 @@ func newConfig() error {
|
||||
srvCfg.SetCacheConfig(globalCacheDrives, globalCacheExcludes, globalCacheExpiry)
|
||||
}
|
||||
|
||||
if globalIsEnvUsageCheck {
|
||||
srvCfg.SetUsageConfig(globalUsageCheckInterval)
|
||||
}
|
||||
|
||||
// hold the mutex lock before a new config is assigned.
|
||||
// Save the new config globally.
|
||||
// unlock the mutex.
|
||||
@@ -358,9 +339,6 @@ func loadConfig() error {
|
||||
globalCacheExcludes = cacheConf.Exclude
|
||||
globalCacheExpiry = cacheConf.Expiry
|
||||
}
|
||||
if !globalIsEnvUsageCheck {
|
||||
globalUsageCheckInterval = globalServerConfig.GetUsageConfig().UsageCheckInterval
|
||||
}
|
||||
globalServerConfigMu.Unlock()
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user