diff options
| author | chrislu <chris.lu@gmail.com> | 2025-11-05 13:38:40 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2025-11-05 13:38:40 -0800 |
| commit | 92525d78cea51d2a4d45a223a346838d5638d148 (patch) | |
| tree | ade99622b05105d50ce48e644504ecf1bc2e8db8 | |
| parent | 629b520edf2c6ab152f62bee9c50df156071fd01 (diff) | |
| download | seaweedfs-92525d78cea51d2a4d45a223a346838d5638d148.tar.xz seaweedfs-92525d78cea51d2a4d45a223a346838d5638d148.zip | |
stop a gRPC stream from the client-side callback is to return a specific error, e.g., io.EOF
| -rw-r--r-- | weed/s3api/s3api_object_handlers_delete.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/s3api/s3api_object_handlers_delete.go b/weed/s3api/s3api_object_handlers_delete.go index fcaac5da0..5369aaa5b 100644 --- a/weed/s3api/s3api_object_handlers_delete.go +++ b/weed/s3api/s3api_object_handlers_delete.go @@ -417,10 +417,10 @@ func deleteEmptyParentDirectories(client filer_pb.SeaweedFilerClient, dirPath ut isEmpty := true err := filer_pb.SeaweedList(ctx, client, string(dirPath), "", func(entry *filer_pb.Entry, isLast bool) error { isEmpty = false - return nil + return io.EOF // Use sentinel error to explicitly stop iteration }, "", false, 1) - if err != nil { + if err != nil && err != io.EOF { glog.V(3).Infof("deleteEmptyParentDirectories: error checking %s: %v", dirPath, err) return } |
