nsivabalan commented on PR #4015:
URL: https://github.com/apache/hudi/pull/4015#issuecomment-1251784271

   @hj2016 : thanks for the elaborate explanation. the fix makes sense. only 
comment I have is, within isBlockCorrupted(), we return in 2 to 3 places incase 
of corrupt. so, may be we could avoid seeking within isBlockCorrupt incase of 
corrupt block and reset it from the callers side. 
   
   ```
   int blockSize = inputStream.readLong();
   
   .
   .
   boolean isBlockCorrupt = isBlockCorrupted(blockSize);
   if (isBlockCorrupt) {
     inputStream.seek(blockStartPos);
     return createCorruptBlock();
   }
   ```
   
   within isBlockCorrupted(blockSize): we should not do any seek incase of 
corrupt block. 
   
   let me know what do you think.
   
   
   
   


-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to