Improve listing consistency with version merging (#13723)

This commit is contained in:
Klaus Post
2021-12-02 11:29:16 -08:00
committed by GitHub
parent 8309ddd486
commit 3db931dc0e
16 changed files with 926 additions and 294 deletions

View File

@@ -764,7 +764,7 @@ type listPathRawOptions struct {
// agreed is called if all disks agreed.
agreed func(entry metaCacheEntry)
// partial will be returned when there is disagreement between disks.
// partial will be called when there is disagreement between disks.
// if disk did not return any result, but also haven't errored
// the entry will be empty and errs will
partial func(entries metaCacheEntries, nAgreed int, errs []error)
@@ -905,7 +905,7 @@ func listPathRaw(ctx context.Context, opts listPathRawOptions) (err error) {
continue
}
// If exact match, we agree.
if current.matches(&entry, opts.bucket) {
if _, ok := current.matches(&entry, true); ok {
topEntries[i] = entry
agree++
continue