mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
do not have to use the same distributionAlgo as first pool (#19031)
when we expand via pools, there is no reason to stick with the same distributionAlgo as the rest. Since the algo only makes sense with-in a pool not across pools. This allows for newer pools to use newer codepaths to avoid legacy file lookups when they have a pre-existing deployment from 2019, they can expand their new pool to be of a newer distribution format, allowing the pool to be more performant.
This commit is contained in:
@@ -72,15 +72,15 @@ func (z *erasureServerPools) SinglePool() bool {
|
||||
func newErasureServerPools(ctx context.Context, endpointServerPools EndpointServerPools) (ObjectLayer, error) {
|
||||
var (
|
||||
deploymentID string
|
||||
distributionAlgo string
|
||||
commonParityDrives int
|
||||
err error
|
||||
|
||||
formats = make([]*formatErasureV3, len(endpointServerPools))
|
||||
storageDisks = make([][]StorageAPI, len(endpointServerPools))
|
||||
z = &erasureServerPools{
|
||||
serverPools: make([]*erasureSets, len(endpointServerPools)),
|
||||
s3Peer: NewS3PeerSys(endpointServerPools),
|
||||
serverPools: make([]*erasureSets, len(endpointServerPools)),
|
||||
s3Peer: NewS3PeerSys(endpointServerPools),
|
||||
distributionAlgo: formatErasureVersionV3DistributionAlgoV3,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -126,7 +126,7 @@ func newErasureServerPools(ctx context.Context, endpointServerPools EndpointServ
|
||||
|
||||
bootstrapTrace("waitForFormatErasure: loading disks", func() {
|
||||
storageDisks[i], formats[i], err = waitForFormatErasure(local, ep.Endpoints, i+1,
|
||||
ep.SetCount, ep.DrivesPerSet, deploymentID, distributionAlgo)
|
||||
ep.SetCount, ep.DrivesPerSet, deploymentID)
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -137,10 +137,6 @@ func newErasureServerPools(ctx context.Context, endpointServerPools EndpointServ
|
||||
deploymentID = formats[i].ID
|
||||
}
|
||||
|
||||
if distributionAlgo == "" {
|
||||
distributionAlgo = formats[i].Erasure.DistributionAlgo
|
||||
}
|
||||
|
||||
// Validate if users brought different DeploymentID pools.
|
||||
if deploymentID != formats[i].ID {
|
||||
return nil, fmt.Errorf("all pools must have same deployment ID - expected %s, got %s for pool(%s)", deploymentID, formats[i].ID, humanize.Ordinal(i+1))
|
||||
@@ -157,10 +153,6 @@ func newErasureServerPools(ctx context.Context, endpointServerPools EndpointServ
|
||||
z.deploymentID = uuid.MustParse(deploymentID)
|
||||
}
|
||||
|
||||
if distributionAlgo != "" && z.distributionAlgo == "" {
|
||||
z.distributionAlgo = distributionAlgo
|
||||
}
|
||||
|
||||
for _, storageDisk := range storageDisks[i] {
|
||||
if storageDisk != nil && storageDisk.IsLocal() {
|
||||
localDrives = append(localDrives, storageDisk)
|
||||
|
||||
Reference in New Issue
Block a user