[Java] Unexpected Allocator states created after allocating buffer whose AllocationManager has different size from the requested size
- 主要语言
- Java
- 星标
- 94
- 派生
- 152
- 平均合并
- 3 天 16 小时
- 30 天内合并 PR
- 11
描述
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.
**Reporter**: [Hongze Zhang](https://issues.apache.org/jira/browse/ARROW-14034) / @zhztheplayer
**Assignee**: [Hongze Zhang](https://issues.apache.org/jira/browse/ARROW-14034) / @zhztheplayer
#### PRs and other links:
- [GitHub Pull Request apache/arrow#11182](https://github.com/apache/arrow/pull/11182)
**Note**: *This issue was originally created as [ARROW-14034](https://issues.apache.org/jira/browse/ARROW-14034). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*
贡献指南
调研方向
先从 issue 中链接的 AllocationManager 大小文档开始,然后跟踪创建和销毁缓冲区时 allocator 的记账过程。查看 PR apache/arrow#11182,了解已经在进行的工作。当自定义 AllocationManager 大小不再导致 allocator 在分配和释放之间的记账不一致时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- backend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100