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


   Hey Roman, I am a bit confused with the logic of 
`BatchingStateChangeUploadScheduler#upload` (sorry although not quite related 
to this fix), but relating to why the deadlock happens.
   
   Before the task thread schedules a `UploadTask`, it requires 
`uploadThrottle` to have **some** capacity to upload. But no matter it has 
**enough** capacity (to upload the full size of `UploadTask`), the `UploadTask` 
is scheduled anyway. Then in 
`BatchingStateChangeUploadScheduler#scheduleUploadIfNeeded`, the scheduled 
uploading is canceled if not having enough capacity and goes into the retrying 
logic.
   
   My question is why not before scheduling an upload task, just make sure it 
has **enough** capacity? 
   
   
   


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