LuciferYang commented on pull request #33556:
URL: https://github.com/apache/spark/pull/33556#issuecomment-893215236


   I check the code again, and a new discovery was synchronized to you @mridulm 
@Ngone51 
   
   The status of `DiskBlockObjectWriter` is lazy initializing, the 
'initialize()' method will only be called passively when the `write()` method 
is called for the first time and set `initialized` as `true`.
   
   So in `No writes at all` scene, neither `close()` nor 
`revertPartialWritesAndClose()` will actually trigger the call of 
`closeResources()` because `initialized` is false and 
`revertPartialWritesAndClose()` will truncate an empty file.
   
   
   


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