nandorKollar commented on PR #13976:
URL: https://github.com/apache/iceberg/pull/13976#issuecomment-3281562998

   > For testing though I wonder if we should have it set up where each suite 
starts it's own Root and closes it, just for testing?
   
   Hmm, not sure how we can achieve that. Do you happen to have any 
recommendation? One approach from me is to add a new method to ArrowAllocation:
   ```
     public static void newRootAllocator() {
       ROOT_ALLOCATOR = new RootAllocator(Long.MAX_VALUE);
     }
   ```
   
   then we can add a new method to each test:
   ```
     @AfterEach
     public void afterEach() {
           ArrowAllocation.rootAllocator().close();
           ArrowAllocation.newRootAllocator();
     }
   ```
   
   This requires change in many test classes though, not sure how we can avoid 
that, or make it at least simpler. Also, I don't like exposing the 
`newRootAllocator` method, but somehow we should "reset" ArrowAllocation, as 
each test method should close the root allocator.


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