kinolaev commented on code in PR #15713:
URL: https://github.com/apache/iceberg/pull/15713#discussion_r3528286604


##########
core/src/test/java/org/apache/iceberg/TestTables.java:
##########
@@ -410,4 +411,106 @@ public void deleteFiles(Iterable<String> pathsToDelete) 
throws BulkDeletionFailu
       throw new RuntimeException("Expected to mock this function");
     }
   }
+
+  /** A {@link FileIO} that enforces a limit on concurrent open input streams. 
*/
+  public static class TrackingFileIO implements FileIO {

Review Comment:
   Thanks @nastra, that is definitely a good alternative. But do we want to 
test:
   1) that `ManifestFilterManager` closes `liveEntries()` before opening it 
again, or
   2) that a single file commit requires only one connection from a connection 
pool?
   I intentionally chose the second approach to ensure there are no other 
similar bugs in the commit path. And I think `TrackingFileIO` might be useful 
for other tests in the future, which is why I put it in `TestTables`.
   
   I ran your test and it works as expected. Let me know if you still prefer to 
keep things isolated, and I'll go ahead and replace the test.



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