[GitHub] [flink] becketqin commented on pull request #11856: [FLINK-17268][connector/common] Fix the bug of missing records during SplitFetcher wakeup.

2020-04-26 Thread GitBox


becketqin commented on pull request #11856:
URL: https://github.com/apache/flink/pull/11856#issuecomment-619655010


   > The fact that this Interruption-based flow is hard to get right looks like 
it is at least part of the reason for the original bug, so I think it is worth 
thinking about.
   
   The interruption could happen in two cases:
   1. Thrown from `SplitFetcher.wakeup();`
   2. Thrown from `BlockingQueue.put()` in `FetchTask.run()`;
   
   There isn't much we can do in the first case, but we can probably have an 
implementation of `BlockingQueue` (just like the handover you mentioned) to 
avoid `InterruptedException` on `put()` in the second case.



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [flink] becketqin commented on pull request #11856: [FLINK-17268][connector/common] Fix the bug of missing records during SplitFetcher wakeup.

2020-04-26 Thread GitBox


becketqin commented on pull request #11856:
URL: https://github.com/apache/flink/pull/11856#issuecomment-619653062


   @StephanEwen Thanks for the review. You are right, the wakeup is difficult 
to make right. I found the major difficulty comes from the efforts to have 
"fine-grained" wakeup, i.e. avoid waking up the `SplitFetcher` unnecessarily, 
because we don't know if the call to `SplitFetcher.wakeup()` is always 
efficient. Maybe we don't really need to worry about this. If so, the code 
would be much more straightforward with a "coarse-grained" wakeup.
   
   I am curious about your suggestion of using `LockSupport`. Would be glad to 
hear the idea.



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org