aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-11-07 12:39:36 -0800
committerChris Lu <chris.lu@gmail.com>2021-11-07 12:39:36 -0800
commit6e999f1176aa02c215c01e79a24b6e993786d566 (patch)
tree63c9b8548be313e15941b012b232d7d049704f9c
parenta8b0f8864d4870d59e4e098d33997f416af8c6ba (diff)
downloadseaweedfs-6e999f1176aa02c215c01e79a24b6e993786d566.tar.xz
seaweedfs-6e999f1176aa02c215c01e79a24b6e993786d566.zip
s3: fix ListObject if more than 10000 objects
-rw-r--r--weed/s3api/s3api_objects_list_handlers.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/s3api/s3api_objects_list_handlers.go b/weed/s3api/s3api_objects_list_handlers.go
index 6c68e5e68..20ab1d4d6 100644
--- a/weed/s3api/s3api_objects_list_handlers.go
+++ b/weed/s3api/s3api_objects_list_handlers.go
@@ -220,12 +220,16 @@ func (s3a *S3ApiServer) doListFilerEntries(client filer_pb.SeaweedFilerClient, d
err = subErr
return
}
+ counter += subCounter
isTruncated = isTruncated || subIsTruncated
maxKeys -= subCounter
nextMarker = subDir + "/" + subNextMarker
// finished processing this sub directory
marker = subDir
}
+ if maxKeys <= 0 {
+ return
+ }
// now marker is also a direct child of dir
request := &filer_pb.ListEntriesRequest{