[Flight client] Allow disabling the creation of a child allocator
- Dominant language
- Java
- Stars
- 94
- Forks
- 152
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 11
Description
### Describe the enhancement requested
`FlightClient` [always creates a child allocator](https://github.com/apache/arrow-java/blob/7cbf15994ae7c82fbcb178dded6b3f128219d9ad/flight/flight-core/src/main/java/org/apache/arrow/flight/FlightClient.java#L86). While this is good in the general case to track memory leaks, this prevents usage scenarios where vectors live longer than the Flight client.
What about adding a `FlightClient.Builder#createChildAllocator(boolean)` that would allow users to choose whether they want a child allocator (current behavior which will be the default) or directly use the provided one?
I can create a PR for this.
Contributor guide
Research direction
Start at flight/flight-core/src/main/java/org/apache/arrow/flight/FlightClient.java around line 86 and trace FlightClient.Builder. Verify that the default still creates a child allocator while the new option can use the provided allocator directly. Done when both allocator modes are covered by the relevant Flight client tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100