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
S3 Tables: fix gRPC stream loop handling for list operations
Chris Luf13e250fc312
diff --git a/weed/s3api/s3tables/handler_bucket_get_list_delete.go b/weed/s3api/s3tables/handler_bucket_get_list_delete.goindex 56bebb49a9..830bf9e6ce 100644--- a/weed/s3api/s3tables/handler_bucket_get_list_delete.go+++ b/weed/s3api/s3tables/handler_bucket_get_list_delete.go@@ -4,6 +4,7 @@ import ("encoding/json""errors""fmt"+ "io""net/http""strings"@@ -106,7 +107,10 @@ func (h *S3TablesHandler) handleListTableBuckets(w http.ResponseWriter, r *http.for {entry, respErr := resp.Recv()if respErr != nil {- break+ if respErr == io.EOF {+ break+ }+ return respErr}if entry.Entry == nil {continue@@ -219,7 +223,10 @@ func (h *S3TablesHandler) handleDeleteTableBucket(w http.ResponseWriter, r *httpfor {entry, err := resp.Recv()if err != nil {- break+ if err == io.EOF {+ break+ }+ return err}if entry.Entry != nil && !strings.HasPrefix(entry.Entry.Name, ".") {hasChildren = truediff --git a/weed/s3api/s3tables/handler_table.go b/weed/s3api/s3tables/handler_table.goindex 01e407622e..b8b3540a34 100644--- a/weed/s3api/s3tables/handler_table.go+++ b/weed/s3api/s3tables/handler_table.go@@ -5,6 +5,7 @@ import ("encoding/json""errors""fmt"+ "io""net/http""strings""time"@@ -338,7 +339,10 @@ func (h *S3TablesHandler) listTablesInNamespaceWithClient(ctx context.Context, cfor {entry, respErr := resp.Recv()if respErr != nil {- break+ if respErr == io.EOF {+ break+ }+ return respErr}if entry.Entry == nil {continue@@ -415,7 +419,10 @@ func (h *S3TablesHandler) listTablesInAllNamespaces(ctx context.Context, filerClfor {entry, respErr := resp.Recv()if respErr != nil {- break+ if respErr == io.EOF {+ break+ }+ return respErr}if entry.Entry == nil {continue