otterc commented on pull request #35076:
URL: https://github.com/apache/spark/pull/35076#issuecomment-1009606408


   > Does file.e.getChannel().truncate(file.getPos()) always success if no IOE 
throw? I saw it will return null in some conditions(NOT familiar with file 
system)
    
   We do depend on truncate to ensure that the data in the merged file is 
consistent with the metadata. If there is some partial shuffle block that has 
been written to the merged file but it has not been committed yet (metadata not 
updated), then truncate will remove that data. If there is a failure during 
truncation then The `FileChannel.truncate`  throws exceptions, otherwise it 
returns the FileChannel. The javadoc for `FileChannel.truncate`  indicates the 
same  as well as the implementation `FileChannelImp.truncate()`. 
   
   


-- 
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: reviews-unsubscr...@spark.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to