Remove erasureSets and erasureObjects from ObjectLayer (#10442)

This commit is contained in:
Klaus Post
2020-09-10 09:18:19 -07:00
committed by GitHub
parent e959c5d71c
commit 493c714663
16 changed files with 56 additions and 136 deletions
+5 -2
View File
@@ -40,6 +40,9 @@ type erasureZones struct {
GatewayUnsupported
zones []*erasureSets
// Shut down async operations
shutdown context.CancelFunc
}
func (z *erasureZones) SingleZone() bool {
@@ -79,7 +82,7 @@ func newErasureZones(ctx context.Context, endpointZones EndpointZones) (ObjectLa
return nil, err
}
}
ctx, z.shutdown = context.WithCancel(ctx)
go intDataUpdateTracker.start(ctx, localDrives...)
return z, nil
}
@@ -218,6 +221,7 @@ func (z *erasureZones) getZoneIdx(ctx context.Context, bucket, object string, op
}
func (z *erasureZones) Shutdown(ctx context.Context) error {
defer z.shutdown()
if z.SingleZone() {
return z.zones[0].Shutdown(ctx)
}
@@ -237,7 +241,6 @@ func (z *erasureZones) Shutdown(ctx context.Context) error {
}
// let's the rest shutdown
}
return nil
}