fix: use NumVersions for list resolver (#12599)

also do not incorrectly double count
objExists unless its selected and it
matches with previous entry.

Bonus: change listQuorum to match with
AskDisks to ensure that we atleast by
default choose all the "drives" that
we asked is consistent.
This commit is contained in:
Harshavardhana
2021-06-30 07:43:19 -07:00
committed by GitHub
parent 3137dc2eb3
commit a6ad965799
3 changed files with 16 additions and 9 deletions
+5 -2
View File
@@ -572,8 +572,11 @@ func (er *erasureObjects) listPath(ctx context.Context, o listPathOptions) (entr
}()
askDisks := o.AskDisks
listingQuorum := askDisks - 1
// Special case: ask all disks if the drive count is 4
if askDisks == 0 {
askDisks = globalAPIConfig.getListQuorum()
}
// make sure atleast default '3' lists object is present.
listingQuorum := askDisks
if askDisks == -1 || er.setDriveCount == 4 {
askDisks = len(disks) // with 'strict' quorum list on all online disks.
listingQuorum = getReadQuorum(er.setDriveCount)