Fix crash in new healing simplification refactor (#12764)

HealObjects() will lead to a crash after recent refactor, fix it.

Co-authored-by: Anis Elleuch <anis@min.io>
This commit is contained in:
Anis Elleuch 2021-07-21 16:48:33 +01:00 committed by GitHub
parent b74bdae4c8
commit 2f728571ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1983,8 +1983,8 @@ func (z *erasureServerSets) HealObjects(ctx context.Context, bucket, prefix stri
var skipped int
for _, zone := range z.serverSets {
entryChs := zone.startMergeWalksVersions(ctx, bucket, prefix, "", true, ctx.Done())
entriesInfos := make([]FileInfoVersions, 0, len(entryChs))
entriesValid := make([]bool, 0, len(entryChs))
entriesInfos := make([]FileInfoVersions, len(entryChs))
entriesValid := make([]bool, len(entryChs))
for {
entry, quorumCount, ok := lexicallySortedEntryVersions(entryChs, entriesInfos, entriesValid)