zeroshade commented on code in PR #452:
URL: https://github.com/apache/iceberg-go/pull/452#discussion_r2129947895


##########
table/table.go:
##########
@@ -110,15 +112,19 @@ func (t Table) Append(ctx context.Context, rdr 
array.RecordReader, snapshotProps
        return txn.Commit(ctx)
 }
 
-func (t Table) AllManifests() iter.Seq2[iceberg.ManifestFile, error] {
+func (t Table) AllManifests(ctx context.Context) 
iter.Seq2[iceberg.ManifestFile, error] {
        type list = tblutils.Enumerated[[]iceberg.ManifestFile]
        g := errgroup.Group{}
 
        n := len(t.metadata.Snapshots())
        ch := make(chan list, n)
        for i, sn := range t.metadata.Snapshots() {
                g.Go(func() error {
-                       manifests, err := sn.Manifests(t.fs)
+                       fs, err := t.fsF(ctx)
+                       if err != nil {
+                               return err
+                       }

Review Comment:
   should probably pull this out of the loop and goroutines. just initialize 
the file system and then use the same instance for all the goroutines.



-- 
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