You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by tillrohrmann <gi...@git.apache.org> on 2017/09/06 09:26:34 UTC

[GitHub] flink pull request #4650: [FLINK-7430] Set StreamTask.isRunning to false aft...

GitHub user tillrohrmann opened a pull request:

    https://github.com/apache/flink/pull/4650

    [FLINK-7430] Set StreamTask.isRunning to false after closing StreamOperators

    ## What is the purpose of the change
    
    Closing StreamOperators is still part of the StreamTask's running lifecycle,
    because operators which perform asynchronous operations usually finish their
    work when the StreamOperator is closed. Since this also entails that errors
    can occur and that a checkpointing operation is triggered, we should only set
    the StreamTask's isRunning to false after all StreamOperators have been closed.
    
    Furthermore, this commit introduces a while guard for the waiting condition in
    ContinuousFileReaderOperator#close.
    
    R @aljoscha.
    
    ## Brief change log
    
    - Set `StreamTask#isRunning` to false after all operators have been closed
    - Use `while` loop instead of `if` condition for guarding synchronization in `ContinuousFileReaderOperator#close`
    
    ## Verifying this change
    
    This change added tests and can be verified as follows:
    
    - `StreamTaskTest#testOperatorClosingBeforeStopRunning` verifies that `StreamTask#isRunning == true` when the close method of the `StreamOperators` is called.
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): (no)
      - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
      - The serializers: (no)
      - The runtime per-record code paths (performance sensitive): (no)
      - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
      - **Affects the `StreamTask` lifecycle**
    
    ## Documentation
    
      - Does this pull request introduce a new feature? (no)
      - If yes, how is the feature documented? (not applicable)
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tillrohrmann/flink fixStreamTask

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/4650.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4650
    
----

----


---

[GitHub] flink issue #4650: [FLINK-7430] Set StreamTask.isRunning to false after clos...

Posted by aljoscha <gi...@git.apache.org>.
Github user aljoscha commented on the issue:

    https://github.com/apache/flink/pull/4650
  
    Code looks good! I think you can merge as soon as travis is green.
    
    Excellent, that you added a test. And it's quite concise with the new Java 8 magic. 😃 


---

[GitHub] flink pull request #4650: [FLINK-7430] Set StreamTask.isRunning to false aft...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/4650


---

[GitHub] flink issue #4650: [FLINK-7430] Set StreamTask.isRunning to false after clos...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on the issue:

    https://github.com/apache/flink/pull/4650
  
    Thanks for the review @aljoscha. Travis passed. Merging this PR.


---