apache / apache/arrow-java

[Java] BaseVariableWidthVector only supports 1 GiB through safe interfaces

Ouverte
#220 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Type: bug
Langage dominant
Java
Étoiles
94
Forks
152
Merge moyen
3 j 16 h
PR mergées (30 j)
11

Description

### Describe the bug, including details regarding any error messages, version, and platform.

https://github.com/apache/arrow/pull/13815 fixed an issue with a misleading error caused by going over the 2GiB limit of a variable width vector, but it also introduced a 1 GiB limit when using the safe interfaces. Basically whenever you try to add data beyond 1 GiB, the vector will try to double itself to the next power of two, which would be 2147483648, which is greater than Integer.MAX_VALUE which is 2147483647, thus throwing a OversizedAllocationException. This effectively limits the total size allowed in the buffer to 1 GiB, even though it should only really be bound by the max offset being less than Integer.MAX_VALUE.

See https://github.com/apache/spark/pull/39572#issuecomment-1383195213 and the comment above it for how I could recreate the issue.

### Component(s)

Java

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Reproduisez l’échec à 1 GiB en utilisant le scénario décrit dans la discussion Apache Spark liée, puis suivez la croissance de la capacité dans BaseVariableWidthVector et ses interfaces sûres. La correction est terminée lorsque les données de largeur variable peuvent dépasser 1 GiB sans tenter d’effectuer une allocation invalide de 2 GiB, tout en respectant la limite d’offset Integer.MAX_VALUE ; ajoutez un test de régression pour cette limite.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
data-engineering
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.