ZihanLi58 commented on a change in pull request #3214:
URL: https://github.com/apache/incubator-gobblin/pull/3214#discussion_r564886611



##########
File path: 
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/StreamModelTaskRunner.java
##########
@@ -86,7 +87,10 @@ protected void run() throws Exception {
 
     // The cancel is not propagated to the extractor's record generator when 
it has been turned into a hot Flowable
     // by publish, so set the shutdownRequested flag on cancel to stop the 
extractor
-    Flowable streamWithShutdownOnCancel = connectableStream.doOnCancel(() -> 
this.shutdownRequested.set(true));
+    Flowable streamWithShutdownOnCancel = connectableStream.doOnCancel(() -> {
+      this.shutdownRequested.set(true);
+      this.extractor.shutdown();

Review comment:
       only when we request a new record in publisher,  the extractor will 
shutdown. But in some edge case, i.e. consumer is really slow and we have meet 
the buffer and not requests record anymore. So I add this to force/make sure 
executor.shutdown() is called.




----------------------------------------------------------------
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:
[email protected]


Reply via email to