Browse Source

Fix odd shadowing bug in XL init. (#3874)

Fixes #3873
pull/3875/head
Harshavardhana 9 years ago
committed by GitHub
parent
commit
43317530d5
  1. 6
      Makefile
  2. 6
      cmd/xl-v1.go

6
Makefile

@ -71,10 +71,8 @@ verifiers: vet fmt lint cyclo spelling
vet: vet:
@echo "Running $@:" @echo "Running $@:"
@go tool vet -all ./cmd
@go tool vet -all ./pkg
@go tool vet -shadow=true ./cmd
@go tool vet -shadow=true ./pkg
@go vet github.com/minio/minio/cmd/...
@go vet github.com/minio/minio/pkg/...
fmt: fmt:
@echo "Running $@:" @echo "Running $@:"

6
cmd/xl-v1.go

@ -140,9 +140,9 @@ func newXLObjects(storageDisks []StorageAPI) (ObjectLayer, error) {
// Check if object cache is enabled. // Check if object cache is enabled.
if xl.objCacheEnabled { if xl.objCacheEnabled {
// Initialize object cache. // Initialize object cache.
objCache, err := objcache.New(maxCacheSize, objcache.DefaultExpiry)
if err != nil {
return nil, err
objCache, oerr := objcache.New(maxCacheSize, objcache.DefaultExpiry)
if oerr != nil {
return nil, oerr
} }
objCache.OnEviction = func(key string) { objCache.OnEviction = func(key string) {
debug.FreeOSMemory() debug.FreeOSMemory()

Loading…
Cancel
Save