LuciferYang commented on code in PR #1119: URL: https://github.com/apache/arrow-java/pull/1119#discussion_r3489687152
########## vector/src/main/java/org/apache/arrow/vector/compression/AbstractCompressionCodec.java: ########## Review Comment: Good point — the original framing implied a concurrency guarantee we don't actually provide, and there's no in-tree `doCompress` implementation that mutates the source buffer's `writerIndex`. Tightened the comment to state only the engineering invariant (three in-method consumers must observe the same value) and dropped the "shared reference" / `doCompress` speculation: ```java // GH-1116: capture writerIndex() once so the empty-buffer check, size // comparison, and uncompressed-length prefix all see the same value. long uncompressedLength = uncompressedBuffer.writerIndex(); ``` Pushed in d7b6a8fb5. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
