[
https://issues.apache.org/jira/browse/ARROW-14034?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Krisztian Szucs updated ARROW-14034:
------------------------------------
Fix Version/s: 9.0.0
(was: 8.0.0)
> [Java] Unexpected Allocator states created after allocating buffer whose
> AllocationManager has different size from the requested size
> -------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ARROW-14034
> URL: https://issues.apache.org/jira/browse/ARROW-14034
> Project: Apache Arrow
> Issue Type: Bug
> Components: Java
> Affects Versions: 5.0.0
> Reporter: Hongze Zhang
> Assignee: Hongze Zhang
> Priority: Major
> Labels: pull-request-available
> Fix For: 9.0.0
>
> Time Spent: 2h 10m
> Remaining Estimate: 0h
>
> If a buffer with altered AllocationManager size (which means, the size is
> different from request size) is created from a Allocator, then allocator
> still adds the request size rather than the altered size to its accountant.
> As a result inconsistency will be made once the buffer is getting destroyed
> because at that time the actual buffer size is used for releasing.
> The predefined AllocationManager implementations don't make such
> inconsistencies since they always grant chunks within the request size.
> However we have
> [documented|https://github.com/apache/arrow/blob/e5f3e04b4b80c9b9c53f1f0f71f39d9f8308dced/java/memory/memory-core/src/main/java/org/apache/arrow/memory/AllocationManager.java#L184-L191]
> that the actual size can be altered from request size in custom
> implementations of AllocationManager. So this kind of customization should be
> supported.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)