Skip to content

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.

S3 Tables: fix gRPC stream loop handling in namespace handlers

Chris Lud8c7c16aad9c
diff --git a/weed/s3api/s3tables/handler_namespace.go b/weed/s3api/s3tables/handler_namespace.go
index 6d54b86e04..d45641195f 100644
--- a/weed/s3api/s3tables/handler_namespace.go
+++ b/weed/s3api/s3tables/handler_namespace.go
@@ -4,6 +4,7 @@ import (
"encoding/json"
"errors"
"fmt"
+ "io"
"net/http"
"strings"
"time"
@@ -236,7 +237,10 @@ func (h *S3TablesHandler) handleListNamespaces(w http.ResponseWriter, r *http.Re
for {
entry, respErr := resp.Recv()
if respErr != nil {
- break
+ if respErr == io.EOF {
+ break
+ }
+ return respErr
}
if entry.Entry == nil {
continue
@@ -352,7 +356,10 @@ func (h *S3TablesHandler) handleDeleteNamespace(w http.ResponseWriter, r *http.R
for {
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 = true