apache / apache/arrow-java

[Java] Unexpected Allocator states created after allocating buffer whose AllocationManager has different size from the requested size

Aperta
#257 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Type: bug
Lingua principale
Java
Stelle
94
Fork
152
Merge medio
3g 16h
PR unite (30g)
11

Descrizione

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.*

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia dalla documentazione sulle dimensioni di AllocationManager collegata nell’issue, quindi traccia la contabilità dell’allocator quando un buffer viene creato e distrutto. Esamina la PR apache/arrow#11182 per il lavoro già in corso. Il lavoro è completato quando le dimensioni personalizzate di AllocationManager non lasciano più incoerente la contabilità dell’allocator tra allocazione e rilascio.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
backend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.