tree-walk: unify FS and XL tree-walk with functional approach. (#2027)

This commit is contained in:
Krishna Srinivas
2016-07-04 14:19:27 +05:30
committed by Harshavardhana
parent a8a3e95835
commit 7a8b8cd0a1
7 changed files with 233 additions and 382 deletions
+2 -3
View File
@@ -70,9 +70,8 @@ func (fs fsObjects) listMultipartUploads(bucket, prefix, keyMarker, uploadIDMark
walkResultCh, endWalkCh := fs.listPool.Release(listParams{minioMetaBucket, recursive, multipartMarkerPath, multipartPrefixPath})
if walkResultCh == nil {
endWalkCh = make(chan struct{})
walkResultCh = fs.startTreeWalk(minioMetaBucket, multipartPrefixPath, multipartMarkerPath, recursive, func(bucket, object string) bool {
return fs.isMultipartUpload(bucket, object)
}, endWalkCh)
listDir := listDirFactory(fs.isMultipartUpload, fs.storage)
walkResultCh = startTreeWalk(minioMetaBucket, multipartPrefixPath, multipartMarkerPath, recursive, listDir, endWalkCh)
}
for maxUploads > 0 {
walkResult, ok := <-walkResultCh