mirror of
https://github.com/minio/minio.git
synced 2026-11-13 14:44:19 +00:00
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:
1 parent
a5923a5d51
commit
68a2d6fc40
1 file changed
+6
@@ -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),
|
||||
|
||||
Reference in new issue
Block a user