fix: dangling objects on actual namespace (#10822)

This commit is contained in:
Harshavardhana
2020-11-05 11:48:55 -08:00
committed by GitHub
parent 47d715f642
commit b72cac4cf3
3 changed files with 32 additions and 3 deletions

View File

@@ -2242,9 +2242,15 @@ func generateTLSCertKey(host string) ([]byte, []byte, error) {
func mustGetZoneEndpoints(args ...string) EndpointServerSets {
endpoints := mustGetNewEndpoints(args...)
drivesPerSet := len(args)
setCount := 1
if len(args) >= 16 {
drivesPerSet = 16
setCount = len(args) / 16
}
return []ZoneEndpoints{{
SetCount: 1,
DrivesPerSet: len(args),
SetCount: setCount,
DrivesPerSet: drivesPerSet,
Endpoints: endpoints,
}}
}