mirror of
https://github.com/minio/minio.git
synced 2025-11-20 09:56:07 -05:00
Avoid pointer based copy, instead use Clone() (#8547)
This PR adds functional test to test expanded cluster syntax.
This commit is contained in:
committed by
Nitish Tiwari
parent
9565641b9b
commit
4e9de58675
@@ -50,15 +50,30 @@ func (z *xlZones) quickHealBuckets(ctx context.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize new zone of erasure codes.
|
||||
func newXLZones(endpointZones EndpointZones, formats []*formatXLV3) (ObjectLayer, error) {
|
||||
z := &xlZones{}
|
||||
// Initialize new zone of erasure sets.
|
||||
func newXLZones(endpointZones EndpointZones) (ObjectLayer, error) {
|
||||
var (
|
||||
deploymentID string
|
||||
err error
|
||||
|
||||
formats = make([]*formatXLV3, len(endpointZones))
|
||||
z = &xlZones{zones: make([]*xlSets, len(endpointZones))}
|
||||
)
|
||||
for i, ep := range endpointZones {
|
||||
sets, err := newXLSets(ep.Endpoints, formats[i], ep.SetCount, ep.DrivesPerSet)
|
||||
formats[i], err = waitForFormatXL(endpointZones.First(), ep.Endpoints,
|
||||
ep.SetCount, ep.DrivesPerSet, deploymentID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if deploymentID == "" {
|
||||
deploymentID = formats[i].ID
|
||||
}
|
||||
}
|
||||
for i, ep := range endpointZones {
|
||||
z.zones[i], err = newXLSets(ep.Endpoints, formats[i], ep.SetCount, ep.DrivesPerSet)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
z.zones = append(z.zones, sets)
|
||||
}
|
||||
z.quickHealBuckets(context.Background())
|
||||
return z, nil
|
||||
|
||||
Reference in New Issue
Block a user