|
|
@ -31,11 +31,9 @@ import ( |
|
|
|
"github.com/dchest/siphash" |
|
|
|
"github.com/dchest/siphash" |
|
|
|
"github.com/google/uuid" |
|
|
|
"github.com/google/uuid" |
|
|
|
"github.com/minio/minio-go/v7/pkg/tags" |
|
|
|
"github.com/minio/minio-go/v7/pkg/tags" |
|
|
|
"github.com/minio/minio/cmd/config" |
|
|
|
|
|
|
|
"github.com/minio/minio/cmd/logger" |
|
|
|
"github.com/minio/minio/cmd/logger" |
|
|
|
"github.com/minio/minio/pkg/bpool" |
|
|
|
"github.com/minio/minio/pkg/bpool" |
|
|
|
"github.com/minio/minio/pkg/dsync" |
|
|
|
"github.com/minio/minio/pkg/dsync" |
|
|
|
"github.com/minio/minio/pkg/env" |
|
|
|
|
|
|
|
"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" |
|
|
|
) |
|
|
|
) |
|
|
@ -81,7 +79,6 @@ type erasureSets struct { |
|
|
|
|
|
|
|
|
|
|
|
// Total number of sets and the number of disks per set.
|
|
|
|
// Total number of sets and the number of disks per set.
|
|
|
|
setCount, setDriveCount int |
|
|
|
setCount, setDriveCount int |
|
|
|
listTolerancePerSet int |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
disksConnectEvent chan diskConnectInfo |
|
|
|
disksConnectEvent chan diskConnectInfo |
|
|
|
|
|
|
|
|
|
|
@ -345,31 +342,24 @@ func newErasureSets(ctx context.Context, endpoints Endpoints, storageDisks []Sto |
|
|
|
|
|
|
|
|
|
|
|
endpointStrings := make([]string, len(endpoints)) |
|
|
|
endpointStrings := make([]string, len(endpoints)) |
|
|
|
|
|
|
|
|
|
|
|
listTolerancePerSet := 3 |
|
|
|
|
|
|
|
// By default this is off
|
|
|
|
|
|
|
|
if env.Get("MINIO_API_LIST_STRICT_QUORUM", config.EnableOn) == config.EnableOn { |
|
|
|
|
|
|
|
listTolerancePerSet = -1 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Initialize the erasure sets instance.
|
|
|
|
// Initialize the erasure sets instance.
|
|
|
|
s := &erasureSets{ |
|
|
|
s := &erasureSets{ |
|
|
|
sets: make([]*erasureObjects, setCount), |
|
|
|
sets: make([]*erasureObjects, setCount), |
|
|
|
erasureDisks: make([][]StorageAPI, setCount), |
|
|
|
erasureDisks: make([][]StorageAPI, setCount), |
|
|
|
erasureLockers: make([][]dsync.NetLocker, setCount), |
|
|
|
erasureLockers: make([][]dsync.NetLocker, setCount), |
|
|
|
erasureLockOwner: GetLocalPeer(globalEndpoints), |
|
|
|
erasureLockOwner: GetLocalPeer(globalEndpoints), |
|
|
|
endpoints: endpoints, |
|
|
|
endpoints: endpoints, |
|
|
|
endpointStrings: endpointStrings, |
|
|
|
endpointStrings: endpointStrings, |
|
|
|
setCount: setCount, |
|
|
|
setCount: setCount, |
|
|
|
setDriveCount: setDriveCount, |
|
|
|
setDriveCount: setDriveCount, |
|
|
|
listTolerancePerSet: listTolerancePerSet, |
|
|
|
format: format, |
|
|
|
format: format, |
|
|
|
disksConnectEvent: make(chan diskConnectInfo), |
|
|
|
disksConnectEvent: make(chan diskConnectInfo), |
|
|
|
distributionAlgo: format.Erasure.DistributionAlgo, |
|
|
|
distributionAlgo: format.Erasure.DistributionAlgo, |
|
|
|
deploymentID: uuid.MustParse(format.ID), |
|
|
|
deploymentID: uuid.MustParse(format.ID), |
|
|
|
pool: NewMergeWalkPool(globalMergeLookupTimeout), |
|
|
|
pool: NewMergeWalkPool(globalMergeLookupTimeout), |
|
|
|
poolSplunk: NewMergeWalkPool(globalMergeLookupTimeout), |
|
|
|
poolSplunk: NewMergeWalkPool(globalMergeLookupTimeout), |
|
|
|
poolVersions: NewMergeWalkVersionsPool(globalMergeLookupTimeout), |
|
|
|
poolVersions: NewMergeWalkVersionsPool(globalMergeLookupTimeout), |
|
|
|
mrfOperations: make(map[healSource]int), |
|
|
|
mrfOperations: make(map[healSource]int), |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
mutex := newNSLock(globalIsDistErasure) |
|
|
|
mutex := newNSLock(globalIsDistErasure) |
|
|
|