Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-6134

Set UUID(0L, 0L) as default leader session id

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.3.0
    • Labels:
      None

      Description

      The leader election/retrieval services use the null value as the default leader id in the standalone case but also as no active leader in the ZooKeeper case. This is ambiguous and therefore I propose to change the default leader id to UUID(0L, 0L). Consequently, a null leader id value can then indicate that there is no active leader available.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user tillrohrmann opened a pull request:

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

          FLINK-6134 Set UUID(0L, 0L) as default leader session id

          Before the default leader session id was null in the standalone case. However, in the ZooKeeper
          case null indicated that there was no active leader available. With this commit, the default
          leader id will be set to UUID(0L, 0L). This allows the uniform treatment of null denoting that
          there is no active leader across the standalone and the ZooKeeper case.

          With this change, the FlinkActors will now ignore all LeaderSessionMessages if the actor's
          leader id field is null. This indicates that the FlinkActor does not know the current leader.

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

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

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

          https://github.com/apache/flink/pull/3578.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 #3578


          commit 0fb0fe0a99de80379da2b758b06d333a7646c478
          Author: Till Rohrmann <trohrmann@apache.org>
          Date: 2017-03-20T17:15:57Z

          FLINK-6134 Set UUID(0L, 0L) as default leader session id

          Before the default leader session id was null in the standalone case. However, in the ZooKeeper
          case null indicated that there was no active leader available. With this commit, the default
          leader id will be set to UUID(0L, 0L). This allows the uniform treatment of null denoting that
          there is no active leader across the standalone and the ZooKeeper case.

          With this change, the FlinkActors will now ignore all LeaderSessionMessages if the actors's
          leader id field is null. This indicates that the FlinkActor does not know the current leader.


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user tillrohrmann opened a pull request: https://github.com/apache/flink/pull/3578 FLINK-6134 Set UUID(0L, 0L) as default leader session id Before the default leader session id was null in the standalone case. However, in the ZooKeeper case null indicated that there was no active leader available. With this commit, the default leader id will be set to UUID(0L, 0L). This allows the uniform treatment of null denoting that there is no active leader across the standalone and the ZooKeeper case. With this change, the FlinkActors will now ignore all LeaderSessionMessages if the actor's leader id field is null. This indicates that the FlinkActor does not know the current leader. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tillrohrmann/flink introduceDefaultLeaderId Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3578.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 #3578 commit 0fb0fe0a99de80379da2b758b06d333a7646c478 Author: Till Rohrmann <trohrmann@apache.org> Date: 2017-03-20T17:15:57Z FLINK-6134 Set UUID(0L, 0L) as default leader session id Before the default leader session id was null in the standalone case. However, in the ZooKeeper case null indicated that there was no active leader available. With this commit, the default leader id will be set to UUID(0L, 0L). This allows the uniform treatment of null denoting that there is no active leader across the standalone and the ZooKeeper case. With this change, the FlinkActors will now ignore all LeaderSessionMessages if the actors's leader id field is null. This indicates that the FlinkActor does not know the current leader.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user StephanEwen commented on the issue:

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

          Good fix!
          Changes look good. Pending CI success, +1 to merge

          Show
          githubbot ASF GitHub Bot added a comment - Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/3578 Good fix! Changes look good. Pending CI success, +1 to merge
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user tillrohrmann commented on the issue:

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

          Thanks for the review @StephanEwen.

          Travis passed locally: https://travis-ci.org/tillrohrmann/flink/jobs/213720094.

          The failing test case is unrelated due to a problem downloading an old Flink version for japicmp. Merging this PR.

          Show
          githubbot ASF GitHub Bot added a comment - Github user tillrohrmann commented on the issue: https://github.com/apache/flink/pull/3578 Thanks for the review @StephanEwen. Travis passed locally: https://travis-ci.org/tillrohrmann/flink/jobs/213720094 . The failing test case is unrelated due to a problem downloading an old Flink version for japicmp. Merging this PR.
          Hide
          till.rohrmann Till Rohrmann added a comment -

          Fixed via 2dfd463e2a3ca2cc1428753b51a980f181a468a9

          Show
          till.rohrmann Till Rohrmann added a comment - Fixed via 2dfd463e2a3ca2cc1428753b51a980f181a468a9
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

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

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/3578

            People

            • Assignee:
              till.rohrmann Till Rohrmann
              Reporter:
              till.rohrmann Till Rohrmann
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development