mirror of
https://github.com/minio/minio.git
synced 2025-04-27 13:24:52 -04:00
fix: print errors only when metacache status has errors (#11248)
This commit is contained in:
parent
f21d650ed4
commit
4593b146be
6
Makefile
6
Makefile
@ -17,9 +17,9 @@ checks:
|
|||||||
getdeps:
|
getdeps:
|
||||||
@mkdir -p ${GOPATH}/bin
|
@mkdir -p ${GOPATH}/bin
|
||||||
@which golangci-lint 1>/dev/null || (echo "Installing golangci-lint" && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.27.0)
|
@which golangci-lint 1>/dev/null || (echo "Installing golangci-lint" && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.27.0)
|
||||||
@which ruleguard 1>/dev/null || (echo "Installing ruleguard" && GO111MODULE=off go get github.com/quasilyte/go-ruleguard/...)
|
@which ruleguard 1>/dev/null || (echo "Installing ruleguard" && go get github.com/quasilyte/go-ruleguard/cmd/ruleguard@v0.2.1)
|
||||||
@which msgp 1>/dev/null || (echo "Installing msgp" && GO111MODULE=off go get github.com/tinylib/msgp)
|
@which msgp 1>/dev/null || (echo "Installing msgp" && go get github.com/tinylib/msgp@v1.1.3)
|
||||||
@which stringer 1>/dev/null || (echo "Installing stringer" && GO111MODULE=off go get golang.org/x/tools/cmd/stringer)
|
@which stringer 1>/dev/null || (echo "Installing stringer" && go get golang.org/x/tools/cmd/stringer)
|
||||||
|
|
||||||
crosscompile:
|
crosscompile:
|
||||||
@(env bash $(PWD)/buildscripts/cross-compile.sh)
|
@(env bash $(PWD)/buildscripts/cross-compile.sh)
|
||||||
|
@ -654,11 +654,11 @@ func (er *erasureObjects) listPath(ctx context.Context, o listPathOptions) (entr
|
|||||||
meta.endedCycle = intDataUpdateTracker.current()
|
meta.endedCycle = intDataUpdateTracker.current()
|
||||||
meta, err = o.updateMetacacheListing(meta, rpc)
|
meta, err = o.updateMetacacheListing(meta, rpc)
|
||||||
if meta.status == scanStateError {
|
if meta.status == scanStateError {
|
||||||
|
logger.LogIf(ctx, err)
|
||||||
cancel()
|
cancel()
|
||||||
exit = true
|
exit = true
|
||||||
}
|
}
|
||||||
metaMu.Unlock()
|
metaMu.Unlock()
|
||||||
logger.LogIf(ctx, err)
|
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
@ -772,7 +772,7 @@ func (er *erasureObjects) listPath(ctx context.Context, o listPathOptions) (entr
|
|||||||
metaMu.Lock()
|
metaMu.Lock()
|
||||||
meta.error = err.Error()
|
meta.error = err.Error()
|
||||||
meta.status = scanStateError
|
meta.status = scanStateError
|
||||||
meta, err = o.updateMetacacheListing(meta, rpc)
|
meta, _ = o.updateMetacacheListing(meta, rpc)
|
||||||
metaMu.Unlock()
|
metaMu.Unlock()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1478,7 +1478,7 @@ func (s *xlStorage) ReadFileStream(ctx context.Context, volume, path string, off
|
|||||||
if offset == 0 && globalStorageClass.GetDMA() == storageclass.DMAReadWrite {
|
if offset == 0 && globalStorageClass.GetDMA() == storageclass.DMAReadWrite {
|
||||||
file, err = disk.OpenFileDirectIO(filePath, os.O_RDONLY, 0666)
|
file, err = disk.OpenFileDirectIO(filePath, os.O_RDONLY, 0666)
|
||||||
} else {
|
} else {
|
||||||
// Open the fileile fileor reading.
|
// Open the file for reading.
|
||||||
file, err = os.Open(filePath)
|
file, err = os.Open(filePath)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -350,7 +350,7 @@ func largeloopcopy(m fluent.Matcher) {
|
|||||||
m.Match(
|
m.Match(
|
||||||
`for $_, $v := range $_ { $*_ }`,
|
`for $_, $v := range $_ { $*_ }`,
|
||||||
).
|
).
|
||||||
Where(m["v"].Type.Size > 512).
|
Where(m["v"].Type.Size > 1024).
|
||||||
Report(`loop copies large value each iteration`)
|
Report(`loop copies large value each iteration`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user