Actually ignore my previous question. I had made some changes and the previous question is inaccurate.
22.05.2023, 10:09, "a h" <[email protected]>:
I have gone over multiple Java examples for apache arrow flight. In all the flight producers that I have checked (for instance, https://arrow.apache.org/cookbook/java/flight.html), I cannot seem to see any example (perhaps due to reading/testing incorrectly) where inside an 'acceptPut' method, the root or child allocator is being closed upon (I could not locate a try with resources block). I realize a try with resources is being used when the root allocator and cookbook producer is being created. However, for a long running service, is that the desired setup or should one use a try with resources within the acceptPut and similar methods to close the child allocator (not the root one). I believe creating child allocators on the fly might not be as fast but one could try to optimize that. I asked because whenever I use the getHeadroom on the allocator after each acceptPut, I can see that the headroom decreases without being reclaimed & the close method for the auto closeable does not seem to be called. Quite happy to be shown what I am doing wrong as my intent is only to improve the implementation I am working on. Thank you.
