fix: list object versions in distributed setup (#9958)

Remove calls to `WalkVersions` was calling the wrong endpoint, 
so unless quorum could be reached with local disks no results 
would ever be returned.
This commit is contained in:
Klaus Post
2020-07-02 10:29:50 -07:00
committed by GitHub
parent 04de19c870
commit abd999f64a
4 changed files with 10 additions and 18 deletions

View File

@@ -901,11 +901,7 @@ func (s *xlStorage) WalkVersions(volume, dirPath, marker string, recursive bool,
}
walkResultCh := startTreeWalk(GlobalContext, volume, dirPath, marker, recursive, listDir, endWalkCh)
for {
walkResult, ok := <-walkResultCh
if !ok {
return
}
for walkResult := range walkResultCh {
var fiv FileInfoVersions
if HasSuffix(walkResult.entry, SlashSeparator) {
fiv = FileInfoVersions{
@@ -981,11 +977,7 @@ func (s *xlStorage) Walk(volume, dirPath, marker string, recursive bool, endWalk
}
walkResultCh := startTreeWalk(GlobalContext, volume, dirPath, marker, recursive, listDir, endWalkCh)
for {
walkResult, ok := <-walkResultCh
if !ok {
return
}
for walkResult := range walkResultCh {
var fi FileInfo
if HasSuffix(walkResult.entry, SlashSeparator) {
fi = FileInfo{