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/08/24 11:18:31 UTC

[GitHub] flink pull request #4578: [FLINK-7078] [rpc] Introduce FencedRpcEndpoint

GitHub user tillrohrmann opened a pull request:

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

    [FLINK-7078] [rpc] Introduce FencedRpcEndpoint

    ## What is the purpose of the change
    
    Introduce `FencedRpcEndpoint` which requires all RPC messages to have a
    fencing token attached. Based on the received fencing token and the
    actual fencing token, the message will either be discarded if they are
    not equal or it will be processed. That way we are able to filter out
    old messages or messages which originate from a split brain situation.
    
    This PR is based on #4573.
    
    ## Brief change log
    
    - Introduce `FencedRpcEndpoint` which extends `RpcEndpoint` and adds fields for a fencing token
    - Introduce `FencedRpcGateway` which should be implemented by a `FencedRpcEndpoint` and gives access to the current fencing token
    - Introduce `FencedAkkaRpcActor` which filters out all messages which have not a proper fencing token attached
    - Introduce `FencedAkkaInvocationHandler` which attaches to all messages a fencing token
    - Introduce `FencedMainThreadExecutable` which allows to run code in the main thread without fencing token
    - Add `RcpService#connect(String, F, Time)` with `F` being the fencing token to connect to a `FencedRpcEndpoint`
    - Adapt the `AkkaRpcService` to start the correct `AkkaRpcActor` and instantiate the correct `InvocationHandler` when a `FencedRpcEndpoint` is started
    
    - The self gateway always picks up the current fencing token from the `FencedRpcEndpoint`
    - Remote gateways are bound to a fixed fencing token
    - The `MainThreadExecutor` of the `FencedRpcEndpoint` is always bound to the current value of the fencing token
    
    ## Verifying this change
    
    This change added tests and can be verified as follows:
    
    - `FencedRpcEndpointTest` which tests the setting of fencing tokens and filtering of messages
    - `AsyncCallsTest#testRunAsyncWithFencing` and `AsyncCallsTest#testRunAsyncWithoutFencing` which test the fencing of `runAsync` calls
    
    ## 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)
    
    ## Documentation
    
      - Does this pull request introduce a new feature? (yes)
      - 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 rpcFencing

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

    https://github.com/apache/flink/pull/4578.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 #4578
    
----
commit 4b1088243a24fc3791c56eff37e1ca5fada8afbd
Author: Till Rohrmann <tr...@apache.org>
Date:   2017-08-22T14:33:05Z

    [FLINK-7489] Remove startJobExecution and suspendExecution from JobMasterGateway
    
    The job lifecycle methods should not be exposed as RPCs. Therefore, this commit
    removes them from the JobMasterGateway definition.

commit b49297d365249a78680c9da6e982f099cd2871ed
Author: Till Rohrmann <tr...@apache.org>
Date:   2017-08-23T15:08:55Z

    [FLINK-7078] [rpc] Introduce FencedRpcEndpoint
    
    Introduce FencedRpcEndpoint which requires all RPC messages to have a
    fencing token attached. Based on the received fencing token and the
    actual fencing token, the message will either be discarded if they are
    not equal or it will be processed. That way we are able to filter out
    old messages or messages which originate from a split brain situation

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #4578: [FLINK-7078] [rpc] Introduce FencedRpcEndpoint

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #4578: [FLINK-7078] [rpc] Introduce FencedRpcEndpoint

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

    https://github.com/apache/flink/pull/4578
  
    Travis passed. Merging this PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---