ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-484

Clients get SESSION MOVED exception when switching from follower to a leader.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.2.1, 3.3.0
    • Component/s: server
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      When a client is connected to follower and get disconnected and connects to a leader it gets SESSION MOVED excpetion. This is beacuse of a bug in the new feature of ZOOKEEPER-417 that we added in 3.2. All the releases before 3.2 DO NOT have this problem. The fix is to make sure the ownership of a connection gets changed when a session moves from follower to the leader. The workaround to it in 3.2.0 would be to swithc off connection from clients to the leader. take a look at leaderServers java property in http://hadoop.apache.org/zookeeper/docs/r3.2.0/zookeeperAdmin.html.

      1. ZOOKEEPER-484-3.2.patch
        9 kB
        Mahadev konar
      2. ZOOKEEPER-484.patch
        10 kB
        Mahadev konar
      3. sessionTest.patch
        2 kB
        Benjamin Reed

        Activity

        Hide
        Benjamin Reed added a comment -

        this patch recreates the problem.

        Show
        Benjamin Reed added a comment - this patch recreates the problem.
        Hide
        Mahadev konar added a comment -

        this patch fixes the issue, assigning the right owner when a session moves from follower to the leader. Also, updated the tests to check for this. The tests fail without the patch.

        Show
        Mahadev konar added a comment - this patch fixes the issue, assigning the right owner when a session moves from follower to the leader. Also, updated the tests to check for this. The tests fail without the patch.
        Hide
        Giridharan Kesavan added a comment -

        resubmitting the patch to the patch queue.

        Show
        Giridharan Kesavan added a comment - resubmitting the patch to the patch queue.
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12415556/ZOOKEEPER-484.patch
        against trunk revision 800990.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 6 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/167/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/167/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/167/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12415556/ZOOKEEPER-484.patch against trunk revision 800990. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 6 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/167/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/167/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/167/console This message is automatically generated.
        Hide
        Benjamin Reed added a comment -

        +1 looks good mahadev

        Show
        Benjamin Reed added a comment - +1 looks good mahadev
        Hide
        Mahadev konar added a comment -

        patch for 3.2 branch. the one for trunk does not cleanly apply.

        Show
        Mahadev konar added a comment - patch for 3.2 branch. the one for trunk does not cleanly apply.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12415784/ZOOKEEPER-484-3.2.patch
        against trunk revision 801747.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 6 new or modified tests.

        -1 patch. The patch command could not apply the patch.

        Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/170/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12415784/ZOOKEEPER-484-3.2.patch against trunk revision 801747. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 6 new or modified tests. -1 patch. The patch command could not apply the patch. Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/170/console This message is automatically generated.
        Hide
        Mahadev konar added a comment -

        I just committed this.

        Show
        Mahadev konar added a comment - I just committed this.
        Hide
        Hudson added a comment -

        Integrated in ZooKeeper-trunk #408 (See http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/408/)
        . Clients get SESSION MOVED exception when switching from follower to a leader. (mahadev)

        Show
        Hudson added a comment - Integrated in ZooKeeper-trunk #408 (See http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/408/ ) . Clients get SESSION MOVED exception when switching from follower to a leader. (mahadev)

          People

          • Assignee:
            Mahadev konar
            Reporter:
            Mahadev konar
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development