You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/09/20 15:45:00 UTC

[jira] [Commented] (FLINK-7655) Revisit default non-leader id for FencedRpcEndpoints

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

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

GitHub user tillrohrmann opened a pull request:

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

    [FLINK-7655] [flip6] Set fencing token to null if not leader

    ## What is the purpose of the change
    
    This commit changes the fencing behaviour such that a component which is not the
    leader will set its fencing token to null. This distinction allows to throw different
    exceptions depending on whether it is a token mismatch or whether the receiver has
    no fencing token set (== not being the leader).
    
    ## Brief change log
    
    - allow the fencing token to be null in `FencedRpcEndpoint`
    - allow `FencedAkkaInvocationHandler` to send a `null` fencing token
    - filter out messages if component is not a leader in `FencedAkkaRpcActor`
    - Adapt `Dispatcher`, `ResourceManager` and `JobMaster` to set fencing token to `null` at start-up
    
    ## Verifying this change
    
    This change is already covered by existing tests, such as `FencedRpcEndpointTest` and `AsyncCallsTest`.
    
    ## 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? (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 defaultLeaderIds

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

    https://github.com/apache/flink/pull/4689.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 #4689
    
----
commit c4bf767afcc28f96fbfed35cc97ce58b5de009fa
Author: Till Rohrmann <tr...@apache.org>
Date:   2017-09-20T15:39:35Z

    [FLINK-7655] [flip6] Set fencing token to null if not leader
    
    This commit changes the fencing behaviour such that a component which is not the
    leader will set its fencing token to null. This distinction allows to throw different
    exceptions depending on whether it is a token mismatch or whether the receiver has
    no fencing token set (== not being the leader).

----


> Revisit default non-leader id for FencedRpcEndpoints
> ----------------------------------------------------
>
>                 Key: FLINK-7655
>                 URL: https://issues.apache.org/jira/browse/FLINK-7655
>             Project: Flink
>          Issue Type: Bug
>          Components: Distributed Coordination
>    Affects Versions: 1.4.0
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>            Priority: Minor
>              Labels: flip-6
>
> Currently, when a {{FencedRpcEndpoint}} loses leadership, we set its leader id to a random value. This can be problematic, even though it's unlikely, because we might set it to a value which is used somewhere else (e.g. the currently valid leader id). I think it would  be better to simply set the leader id to {{null}} in order to properly encode that the {{FencedRpcEndpoint}} is no longer a leader.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)