mirror of
https://github.com/minio/minio.git
synced 2025-04-20 18:44:21 -04:00
ignore healing .trash, .metacache amd .multipart paths (#11725)
This commit is contained in:
parent
9ccc483df6
commit
78e867e145
@ -35,6 +35,7 @@ import (
|
|||||||
"github.com/minio/minio/cmd/logger"
|
"github.com/minio/minio/cmd/logger"
|
||||||
"github.com/minio/minio/pkg/madmin"
|
"github.com/minio/minio/pkg/madmin"
|
||||||
"github.com/minio/minio/pkg/sync/errgroup"
|
"github.com/minio/minio/pkg/sync/errgroup"
|
||||||
|
"github.com/minio/minio/pkg/wildcard"
|
||||||
)
|
)
|
||||||
|
|
||||||
type erasureServerPools struct {
|
type erasureServerPools struct {
|
||||||
@ -1475,6 +1476,20 @@ func (z *erasureServerPools) HealObjects(ctx context.Context, bucket, prefix str
|
|||||||
if entry.isDir() {
|
if entry.isDir() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// We might land at .metacache, .trash, .multipart
|
||||||
|
// no need to heal them skip, only when bucket
|
||||||
|
// is '.minio.sys'
|
||||||
|
if bucket == minioMetaBucket {
|
||||||
|
if wildcard.Match("buckets/*/.metacache/*", entry.name) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if wildcard.Match("tmp/.trash/*", entry.name) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if wildcard.Match("multipart/*", entry.name) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
fivs, err := entry.fileInfoVersions(bucket)
|
fivs, err := entry.fileInfoVersions(bucket)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errCh <- err
|
errCh <- err
|
||||||
|
@ -27,6 +27,7 @@ import (
|
|||||||
"github.com/minio/minio/pkg/color"
|
"github.com/minio/minio/pkg/color"
|
||||||
"github.com/minio/minio/pkg/console"
|
"github.com/minio/minio/pkg/console"
|
||||||
"github.com/minio/minio/pkg/madmin"
|
"github.com/minio/minio/pkg/madmin"
|
||||||
|
"github.com/minio/minio/pkg/wildcard"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -205,6 +206,20 @@ func (er *erasureObjects) healErasureSet(ctx context.Context, buckets []BucketIn
|
|||||||
if entry.isDir() {
|
if entry.isDir() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// We might land at .metacache, .trash, .multipart
|
||||||
|
// no need to heal them skip, only when bucket
|
||||||
|
// is '.minio.sys'
|
||||||
|
if bucket.Name == minioMetaBucket {
|
||||||
|
if wildcard.Match("buckets/*/.metacache/*", entry.name) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if wildcard.Match("tmp/.trash/*", entry.name) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if wildcard.Match("multipart/*", entry.name) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
fivs, err := entry.fileInfoVersions(bucket.Name)
|
fivs, err := entry.fileInfoVersions(bucket.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.LogIf(ctx, err)
|
logger.LogIf(ctx, err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user