mirror of https://github.com/minio/minio.git
xl: Avoid empty endpoints (#13299)
An endpoint can be empty when a disk is offline or something wrong with it. Avoid it by filling erasureSets.endpointStrings with values from arguments.
This commit is contained in:
parent
a5923a5d51
commit
68a2d6fc40
|
@ -349,6 +349,12 @@ func newErasureSets(ctx context.Context, endpoints Endpoints, storageDisks []Sto
|
|||
|
||||
endpointStrings := make([]string, len(endpoints))
|
||||
|
||||
// Fill endpointString with the same order of endpoints passed as
|
||||
// arguments but it will be reordered later according to disks order
|
||||
for i, endpoint := range endpoints {
|
||||
endpointStrings[i] = endpoint.String()
|
||||
}
|
||||
|
||||
// Initialize the erasure sets instance.
|
||||
s := &erasureSets{
|
||||
sets: make([]*erasureObjects, setCount),
|
||||
|
|
Loading…
Reference in New Issue