[ https://issues.apache.org/jira/browse/ARROW-5100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17662122#comment-17662122 ]
Rok Mihevc commented on ARROW-5100: ----------------------------------- This issue has been migrated to [issue #21587|https://github.com/apache/arrow/issues/21587] on GitHub. Please see the [migration documentation|https://github.com/apache/arrow/issues/14542] for further details. > [JS] Writer swaps byte order if buffers share the same underlying ArrayBuffer > ----------------------------------------------------------------------------- > > Key: ARROW-5100 > URL: https://issues.apache.org/jira/browse/ARROW-5100 > Project: Apache Arrow > Issue Type: Bug > Components: JavaScript > Affects Versions: 0.13.0 > Reporter: Paul Taylor > Assignee: Paul Taylor > Priority: Major > Labels: pull-request-available > Fix For: 0.14.0 > > Time Spent: 0.5h > Remaining Estimate: 0h > > We collapse contiguous Uint8Arrays that share the same underlying ArrayBuffer > and have overlapping byte ranges. This was done to maintain true zero-copy > behavior when using certain node core streams that use a buffer pool > internally, and could write chunks of the same logical Arrow Message at > out-of-order byte offsets in the pool. > Unfortunately this can also lead to a bug where, in rare cases, buffers are > swapped while writing Arrow Messages too. We could have a flag to indicate > whether we think collapsing out-of-order same-buffer chunks is safe, but I'm > not sure if we can always know that, so I'd prefer to take it out and incur > the copy cost. -- This message was sent by Atlassian Jira (v8.20.10#820010)