fallintoplace commented on code in PR #1258:
URL: https://github.com/apache/iceberg-go/pull/1258#discussion_r3461904894


##########
table/table.go:
##########
@@ -303,14 +303,21 @@ func (t Table) AllManifests(ctx context.Context) 
iter.Seq2[iceberg.ManifestFile,
                        go func() {
                                for range results {
                                }
-                               for range errch {
+                               if errch != nil {
+                                       for range errch {
+                                       }
                                }
                        }()
                }()
 
                for {
                        select {
-                       case err := <-errch:
+                       case err, ok := <-errch:
+                               if !ok {
+                                       errch = nil
+
+                                       continue
+                               }

Review Comment:
   Setting `errch = nil` disables that case in the select. Outside a select it 
would block forever, which is why the drain path checks `errch != nil`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to