SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
Fix s3 api object list with params max-keys and prefix
annluda8908810376e6
diff --git a/weed/filer/filerstore_wrapper.go b/weed/filer/filerstore_wrapper.goindex 0fac6a138c..0eecdd6cbe 100644--- a/weed/filer/filerstore_wrapper.go+++ b/weed/filer/filerstore_wrapper.go@@ -292,10 +292,8 @@ func (fsw *FilerStoreWrapper) prefixFilterEntries(ctx context.Context, dirPath ucount := int64(0)for count < limit && len(notPrefixed) > 0 {- var isLastItemHasPrefix boolfor _, entry := range notPrefixed {if strings.HasPrefix(entry.Name(), prefix) {- isLastItemHasPrefix = truecount++if !eachEntryFunc(entry) {return@@ -303,11 +301,9 @@ func (fsw *FilerStoreWrapper) prefixFilterEntries(ctx context.Context, dirPath uif count >= limit {break}- } else {- isLastItemHasPrefix = false}}- if count < limit && isLastItemHasPrefix && len(notPrefixed) == int(limit) {+ if count < limit && lastFileName <= prefix && len(notPrefixed) == int(limit) {notPrefixed = notPrefixed[:0]lastFileName, err = actualStore.ListDirectoryEntries(ctx, dirPath, lastFileName, false, limit, func(entry *Entry) bool {notPrefixed = append(notPrefixed, entry)