You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The previous implementation attempted to allocate a temporary I/O buffer
equal to chunkSize (~2GB), causing OutOfMemoryError even with increased
heap settings. This was a bug introduced when BufferHolder was refactored
to use DEFAULT_CHUNK_SIZE for the I/O buffer.
Changes:
- Use separate IO_BUFFER_SIZE constant (16KB) for reading from streams
- Use ByteArrayOutputStream to accumulate data into chunkSize-sized chunks
- Guarantee all non-final chunks are exactly chunkSize bytes
- Support databases >2GB by creating multiple chunks
- Use chunks.size() to determine SingleBuffer vs MultiBuffer
- Consistent with pre-MultiBuffer approach but with >2GB support
This fixes macOS CI failures and supports databases of any size with
minimal memory overhead.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
0 commit comments