curcur commented on pull request #16844:
URL: https://github.com/apache/flink/pull/16844#issuecomment-901733394


   Thanks @wsry , LGTM. 
   
   **IMPORTANT** for reference (based on offline discussion)
   
   Why pulling `closeBufferPool` into the `fail` method and why not directly 
calling BufferWritingResultPartition#close() method in task cancelation (same 
reason why not put bufferbuilder close in the release internal method).
   
   Race condition:
   
   Task calculation thread and task thread may access `bufferbuilder` at the 
same time. In the current solution, bufferbuilder release is done in the 
task#doRun#finally (task thread only). 


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


Reply via email to