umamaheswararao commented on a change in pull request #2929:
URL: https://github.com/apache/ozone/pull/2929#discussion_r772710942



##########
File path: 
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/ECKeyOutputStream.java
##########
@@ -259,7 +259,7 @@ private StripeWriteStatus rewriteStripeToNewBlockGroup(int 
chunkSize,
         blockOutputStreamEntryPool.getCurrentStreamEntry();
     newBlockGroupStreamEntry
         .updateBlockGroupToAckedPosition(failedStripeDataSize);
-    ecChunkBufferCache.clear(chunkSize);

Review comment:
       Yeah you are right. There is bug exist. I think we started to created 
both buffers at once and just get the buffers whenever we need. We should make 
allocateBuffers API private and use get buffers. AllocateBuffers can happen in 
ctor.
   Originally we started with that: 
https://github.com/umamaheswararao/hadoop-ozone/blob/e82f53ee89c8e2fbe3c4fd4157958180f3621ead/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/ECKeyOutputStream.java
   
   Eventually changed to allocateBuffers. Probably to make that differed 
cellSize of parity buffers to work.
   
   So, the simpler fix would be to replace allocateBuffers with getBuffers and 
make the buffers allocated  in ctor.
   Once we get the buffers we can set the right limits. If you want to cover 
here please go ahead Otherwise you can file one JIRA and assign it to me.
   
    




-- 
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to