[
https://issues.apache.org/jira/browse/HADOOP-19908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18085386#comment-18085386
]
ASF GitHub Bot commented on HADOOP-19908:
-----------------------------------------
pan3793 commented on code in PR #8526:
URL: https://github.com/apache/hadoop/pull/8526#discussion_r3338609412
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/ZStandardCompressor.java:
##########
@@ -301,7 +301,7 @@ public void reset() {
finished = false;
bytesRead = 0;
bytesWritten = 0;
- uncompressedDirectBuf.rewind();
+ uncompressedDirectBuf.clear();
Review Comment:
a defensive change, I don't think `rewind`(means only reset `position` but
not `limit`) causes any problems, but we'd better call `clear` to gain correct
semantics.
> ZStandardDecompressor should reset compressedDirectBuf correctly
> ----------------------------------------------------------------
>
> Key: HADOOP-19908
> URL: https://issues.apache.org/jira/browse/HADOOP-19908
> Project: Hadoop Common
> Issue Type: Bug
> Components: compress
> Affects Versions: 3.5.1
> Reporter: Cheng Pan
> Priority: Major
> Labels: pull-request-available
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]