curcur edited a comment on pull request #16844:
URL: https://github.com/apache/flink/pull/16844#issuecomment-900431151


   I have a concern about this change.
   
   1. It is necessary to recycle BufferBuilder in the 
BufferWritingResultPartition#close method, but not sure why we add 
`closeBufferPool()` in the `fail` method.
   
   2. Originally, `fail()` is responsible for fail only; 
`closeNetworkResources` is responsible to close network-related resources after 
fail() is called.
   In the `TaskCanceler`, `closeNetworkResources` is called to recycle 
resources and finally, BufferWritingResultPartition#close() will also be called 
as well as `closeBufferPool()` in `super.close()`.
   
   I am confused why we break this contract and include resource clean-up in 
fail(), and have to include fail in a cancler? 
   
   Put in another way, why simply add point 1 is not enough?
   
   Let's sync up offline tomorrow.


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