mirror of
https://github.com/minio/minio.git
synced 2025-01-12 15:33:22 -05:00
listBuckets: Bump up the limit of max buckets to 1000.
This commit is contained in:
parent
f5d6be158e
commit
1341fb79c3
@ -27,14 +27,24 @@ import (
|
|||||||
"github.com/minio/minio-xl/pkg/probe"
|
"github.com/minio/minio-xl/pkg/probe"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// listObjectsParams - list objects input parameters.
|
||||||
type listObjectsParams struct {
|
type listObjectsParams struct {
|
||||||
Bucket string
|
// Bucket name to list the objects for.
|
||||||
Prefix string
|
Bucket string
|
||||||
Marker string
|
// list all objects with this parameter as common prefix.
|
||||||
|
Prefix string
|
||||||
|
// list all objects starting with object after marker in
|
||||||
|
// lexicographical order.
|
||||||
|
Marker string
|
||||||
|
// list all objects until the first occurrence of the delimtier
|
||||||
|
// after the prefix.
|
||||||
Delimiter string
|
Delimiter string
|
||||||
MaxKeys int
|
// maximum number of objects returned per listObjects()
|
||||||
|
// operation.
|
||||||
|
MaxKeys int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// listServiceReq
|
||||||
type listServiceReq struct {
|
type listServiceReq struct {
|
||||||
reqParams listObjectsParams
|
reqParams listObjectsParams
|
||||||
respCh chan ListObjectsResult
|
respCh chan ListObjectsResult
|
||||||
@ -44,8 +54,7 @@ type listWorkerReq struct {
|
|||||||
respCh chan ListObjectsResult
|
respCh chan ListObjectsResult
|
||||||
}
|
}
|
||||||
|
|
||||||
// listObjects - list objects lists objects upto maxKeys for a given
|
// listObjects - list objects lists objects upto maxKeys for a given prefix.
|
||||||
// prefix.
|
|
||||||
func (fs Filesystem) listObjects(bucket, prefix, marker, delimiter string, maxKeys int) (chan<- listWorkerReq, *probe.Error) {
|
func (fs Filesystem) listObjects(bucket, prefix, marker, delimiter string, maxKeys int) (chan<- listWorkerReq, *probe.Error) {
|
||||||
quitWalker := make(chan bool)
|
quitWalker := make(chan bool)
|
||||||
reqCh := make(chan listWorkerReq)
|
reqCh := make(chan listWorkerReq)
|
||||||
@ -67,7 +76,7 @@ func (fs Filesystem) listObjects(bucket, prefix, marker, delimiter string, maxKe
|
|||||||
walkPath = prefixPath
|
walkPath = prefixPath
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
filepath.Walk(walkPath, func(path string, info os.FileInfo, err error) error {
|
Walk(walkPath, func(path string, info os.FileInfo, err error) error {
|
||||||
// We don't need to list the walk path.
|
// We don't need to list the walk path.
|
||||||
if path == walkPath {
|
if path == walkPath {
|
||||||
return nil
|
return nil
|
||||||
@ -99,7 +108,7 @@ func (fs Filesystem) listObjects(bucket, prefix, marker, delimiter string, maxKe
|
|||||||
// If delimiter is set, we stop if current path is a
|
// If delimiter is set, we stop if current path is a
|
||||||
// directory.
|
// directory.
|
||||||
if delimiter != "" && info.IsDir() {
|
if delimiter != "" && info.IsDir() {
|
||||||
return filepath.SkipDir
|
return ErrSkipDir
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
@ -101,7 +101,7 @@ func New(rootPath string) (Filesystem, *probe.Error) {
|
|||||||
/// Defaults
|
/// Defaults
|
||||||
|
|
||||||
// maximum buckets to be listed from list buckets.
|
// maximum buckets to be listed from list buckets.
|
||||||
fs.maxBuckets = 100
|
fs.maxBuckets = 1000
|
||||||
// minium free disk required for i/o operations to succeed.
|
// minium free disk required for i/o operations to succeed.
|
||||||
fs.minFreeDisk = 10
|
fs.minFreeDisk = 10
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user