[ 
https://issues.apache.org/jira/browse/FLINK-2111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15129077#comment-15129077
 ] 

ASF GitHub Bot commented on FLINK-2111:
---------------------------------------

Github user mjsax commented on the pull request:

    https://github.com/apache/flink/pull/750#issuecomment-178836268
  
    > I had some more comments concerning the failure case handling of stop 
calls. The first problem is still the handling of exceptions when calling stop 
on the Invokable in Task.stopExecution. The exception will only be logged but 
no further action is taken. This can lead to a situation where we have a 
corrupted state. I think, we should fail the task in such a situation.
    
    I see what you mean, but we would not get a corrupted state, do we? 
However, I agree that if `Task.stopExecution` throws an exception,  we should 
report this to the user somehow (not just by logging). Failing the task is fine 
with me. I updated the code for this.
    
    > Additionally, the case that a task cannot be found on the TaskManager and 
that an exception occurs in Task.stopExecution are treated identically by 
sending a TaskOperationResult with success == false to the JobManager. On the 
JobManager side this will only be logged. I think the exception case should be 
handled differently. Failing the execution, for example.
    
    This should not be necessary. There are two exception cases here: (1) The 
task in not stoppable (ie, for a batch job). Failing the execution would of 
course not be appropriate. (2) `Task.stopExecution` throws and exception. This 
case is handled already by the discussion from above.
    
    > And it is still possible that you send a StopJob message to the 
JobManager, see that the job is in state RUNNING, then the ExecutionGraph 
switches to RESTARTING, and then the stop call is executed on the 
ExecutionGraph which won't have an effect. As a user you will receive a 
StoppingSuccess message but the job will simply be restarted. I think we should 
also allow stopping jobs when they are in the state RESTARTING.
    
    Design decision.  I extended allowed states for STOP to CREATED, RUNNING, 
and RESTARTING, which is the easier solution. Not sure if we should include 
CREATED or not though... 


> Add "stop" signal to cleanly shutdown streaming jobs
> ----------------------------------------------------
>
>                 Key: FLINK-2111
>                 URL: https://issues.apache.org/jira/browse/FLINK-2111
>             Project: Flink
>          Issue Type: Improvement
>          Components: Distributed Runtime, JobManager, Local Runtime, 
> Streaming, TaskManager, Webfrontend
>            Reporter: Matthias J. Sax
>            Assignee: Matthias J. Sax
>            Priority: Minor
>
> Currently, streaming jobs can only be stopped using "cancel" command, what is 
> a "hard" stop with no clean shutdown.
> The new introduced "stop" signal, will only affect streaming source tasks 
> such that the sources can stop emitting data and shutdown cleanly, resulting 
> in a clean shutdown of the whole streaming job.
> This feature is a pre-requirment for 
> https://issues.apache.org/jira/browse/FLINK-1929



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to