Make WalkDir return errors (#19677)

If used, 'opts.Marker` will cause many missed entries since results are returned 
unsorted, and pools are serialized.

Switch to fully concurrent listing and merging across pools to return sorted entries.
This commit is contained in:
Klaus Post
2024-05-06 13:27:52 -07:00
committed by GitHub
parent 9a9a49aa84
commit 847ee5ac45
9 changed files with 169 additions and 75 deletions

View File

@@ -1136,3 +1136,9 @@ func sleepContext(ctx context.Context, d time.Duration) error {
}
return nil
}
// helper type to return either item or error.
type itemOrErr[V any] struct {
Item V
Err error
}