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
accurate limit
Konstantin Lebedev9a195bebfd6c
diff --git a/weed/filer2/filerstore.go b/weed/filer2/filerstore.goindex db53734bc7..32c4c94fb8 100644--- a/weed/filer2/filerstore.go+++ b/weed/filer2/filerstore.go@@ -155,12 +155,11 @@ func (fsw *FilerStoreWrapper) ListDirectoryPrefixedEntries(ctx context.Context,count++entries = append(entries, entry)}+ if count >= limit {+ goto Exit+ }}- if count >= limit {- break- }-- notPrefixed, err = fsw.ActualStore.ListDirectoryEntries(ctx, dirPath, lastFileName, includeStartFile, limit)+ notPrefixed, err = fsw.ActualStore.ListDirectoryEntries(ctx, dirPath, lastFileName, false, limit)if err != nil {return nil, err}@@ -169,6 +168,7 @@ func (fsw *FilerStoreWrapper) ListDirectoryPrefixedEntries(ctx context.Context,break}}+ Exit:}} else if err != nil {return nil, err