Revert "Support variable server sets (#10314)"

This reverts commit aabf053d2f.
This commit is contained in:
Harshavardhana
2020-12-01 11:59:03 -08:00
parent 02aecb2fc1
commit 790833f3b2
23 changed files with 117 additions and 176 deletions

View File

@@ -76,7 +76,6 @@ func newErasureServerSets(ctx context.Context, endpointServerSets EndpointServer
return nil, err
}
if deploymentID == "" {
// all zones should have same deployment ID
deploymentID = formats[i].ID
}
z.serverSets[i], err = newErasureSets(ctx, ep.Endpoints, storageDisks[i], formats[i])
@@ -98,13 +97,7 @@ func (z *erasureServerSets) GetAllLockers() []dsync.NetLocker {
}
func (z *erasureServerSets) SetDriveCount() int {
minSetDriveCount := z.serverSets[0].SetDriveCount()
for _, serverSet := range z.serverSets {
if minSetDriveCount > serverSet.setDriveCount {
minSetDriveCount = serverSet.setDriveCount
}
}
return minSetDriveCount
return z.serverSets[0].SetDriveCount()
}
type serverSetsAvailableSpace []zoneAvailableSpace
@@ -279,7 +272,7 @@ func (z *erasureServerSets) StorageInfo(ctx context.Context, local bool) (Storag
scParity := globalStorageClass.GetParityForSC(storageclass.STANDARD)
if scParity == 0 {
scParity = getDefaultParityBlocks(z.SetDriveCount())
scParity = z.SetDriveCount() / 2
}
storageInfo.Backend.StandardSCData = z.SetDriveCount() - scParity
@@ -1408,6 +1401,7 @@ func (z *erasureServerSets) Health(ctx context.Context, opts HealthOptions) Heal
parityDrives := globalStorageClass.GetParityForSC(storageclass.STANDARD)
diskCount := z.SetDriveCount()
if parityDrives == 0 {
parityDrives = getDefaultParityBlocks(diskCount)
}