CrynetLogistics commented on pull request #18651:
URL: https://github.com/apache/flink/pull/18651#issuecomment-1049884006


   Sorry not sure why it didn't push my last comment, maybe because I commented 
inline. I pasted it again here for continuity. :-)
   
   @pnowojski I think this is completely wonderful. I believe then the code for 
`completeRequest()` should be:
   
   ```
       private void completeRequest(List<RequestEntryT> failedRequestEntries, 
long requestStartTime) {
           // do completeRequest stuff including reducing the 
inFlightRequestsCount, etc.
           mailboxExecutor.tryYield();
           nonBlockingFlush();
       }
   ```
   
   We would get all the previously alluded to benefits.
   
   My only question (and maybe worry) would be if we had a very large number of 
in flight requests that have all completed (say 100+? since it's customisable 
by user). Once one `completeRequest` is triggered, the 
`mailboxExecutor.tryYield()` would repeatedly yield to the next completed 
request in a daisy chain of length equal to the number of completed in flight 
requests. 
   
   I imagine the state of the mailbox thread would have to live alongside the 
others' states during that time and I was wondering would that risk us using 
more stack/heap than otherwise and thereby risking an overflow?


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