[Java] BaseVariableWidthVector only supports 1 GiB through safe interfaces
- Ngôn ngữ chính
- Java
- Star
- 94
- Fork
- 152
- Merge trung bình
- 3 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 11
Mô tả
### 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
Hướng dẫn đóng góp
Hướng nghiên cứu
Tái hiện lỗi 1 GiB bằng kịch bản được mô tả trong cuộc thảo luận Apache Spark được liên kết, sau đó theo dõi sự tăng trưởng dung lượng trong BaseVariableWidthVector và các interface an toàn của nó. Bản sửa được hoàn tất khi dữ liệu có độ rộng biến đổi có thể tăng vượt quá 1 GiB mà không cố gắng thực hiện một phép cấp phát 2 GiB không hợp lệ, đồng thời vẫn tuân thủ giới hạn offset Integer.MAX_VALUE; thêm một bài kiểm thử hồi quy cho ranh giới này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- data-engineering
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100