[ 
https://issues.apache.org/jira/browse/ARROW-2696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17659722#comment-17659722
 ] 

Rok Mihevc commented on ARROW-2696:
-----------------------------------

This issue has been migrated to [issue 
#19087|https://github.com/apache/arrow/issues/19087] on GitHub. Please see the 
[migration documentation|https://github.com/apache/arrow/issues/14542] for 
further details.

> [JAVA] enhance AllocationListener with an onFailedAllocation() call
> -------------------------------------------------------------------
>
>                 Key: ARROW-2696
>                 URL: https://issues.apache.org/jira/browse/ARROW-2696
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Java
>            Reporter: Vanco Buca
>            Assignee: Vanco Buca
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.10.0
>
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> If an allocation fails, there might be an action taken by user code that will 
> free up some memory before the allocation can be retried again. This action 
> could include flushing some temporary buffers, getting rid of some 
> temporarily cached data, or even spilling state to disk.
> Today's code is forced to catch out-of-memory exceptions, and then retry the 
> operation at a high level. A more elegant way to do this is to have a 
> callback whenever allocation failed. The callback would inform the allocator 
> whether or not to retry the allocation.
> Since the allocator already has an AllocationListener, it makes sense to 
> enhance the existing listener with a new method.
> {{The proposed signature is:}}
> {{  boolean onAllocationFailed(long allocationSize);}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to