[ 
https://issues.apache.org/jira/browse/HDDS-1173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16785541#comment-16785541
 ] 

Mukul Kumar Singh commented on HDDS-1173:
-----------------------------------------

Thanks for working on this [~shashikant]. The patch looks good to me. Some 
comments as following.

1) BufferPool:64, allocateBufferIfNeeded, lets make sure that the position of 
the buffer is zero before returning the buffer.
2) lets add 2 helper functions to determine, a) flush buffer size full b) 
stream buffer max size condition
3) BlockOutputStream:263, lets replace this with buffer.computeBufferData
4) BlockOutputStream:499, clearBufferPool is not needed as the buffer will be 
cleaned via release buffer
5) BlockOutputStream:470, this line is not needed
6) ChunUtils.java:138, lets revert this change.
7) lets replace clearBufferPool, with a function to assert that all the buffers 
have been returned.
8) Lets also change the chunk name signature to include the local id.
9) Please fix the checkstyle and findbugs issues with the patch as well.


> Fix a data corruption bug in BlockOutputStream
> ----------------------------------------------
>
>                 Key: HDDS-1173
>                 URL: https://issues.apache.org/jira/browse/HDDS-1173
>             Project: Hadoop Distributed Data Store
>          Issue Type: Improvement
>          Components: Ozone Client
>    Affects Versions: 0.4.0
>            Reporter: Shashikant Banerjee
>            Assignee: Shashikant Banerjee
>            Priority: Major
>         Attachments: HDDS-1173.000.patch, HDDS-1173.001.patch
>
>
> In the retry path, in BlockOutputStream , the offset is updated incorrectly 
> if  buffer has data more than 1 chunk in the retry path which may lead to 
> writing same data over multiple chunks.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to