mirror of
https://github.com/minio/minio.git
synced 2025-11-24 03:27:44 -05:00
cache: fix commit value lookup in config (#13551)
This commit is contained in:
4
internal/config/cache/lookup.go
vendored
4
internal/config/cache/lookup.go
vendored
@@ -56,7 +56,7 @@ const (
|
||||
DefaultAfter = "0"
|
||||
DefaultWaterMarkLow = "70"
|
||||
DefaultWaterMarkHigh = "80"
|
||||
DefaultCacheCommit = "writethrough"
|
||||
DefaultCacheCommit = WriteThrough
|
||||
)
|
||||
|
||||
// DefaultKVS - default KV settings for caching.
|
||||
@@ -223,7 +223,7 @@ func LookupConfig(kvs config.KVS) (Config, error) {
|
||||
if err != nil {
|
||||
return cfg, err
|
||||
}
|
||||
if cfg.After > 0 && cfg.CacheCommitMode != "" {
|
||||
if cfg.After > 0 && cfg.CacheCommitMode != WriteThrough {
|
||||
err := errors.New("cache after cannot be used with commit writeback")
|
||||
return cfg, config.ErrInvalidCacheSetting(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user