Details

    • Type: Sub-task Sub-task
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.5.0
    • Fix Version/s: 3.5.2, 3.6.0
    • Component/s: tests
    • Labels:
      None

      Description

      testPortChange changes all ports and role of the server and thus causes existing clients to disconnect, while this wouldn't happen if only the client port changes. Need to fix it to only change client port and not all the other parameters and make sure that the clients don't disconnect, while new clients shouldn't be able to connect to the old port.

      1. ZOOKEEPER-2000.patch
        6 kB
        Alexander Shraer
      2. ZOOKEEPER-2000.patch
        6 kB
        Michi Mutsuzaki

        Issue Links

          Activity

          Michi Mutsuzaki made changes -
          Fix Version/s 3.5.2 [ 12331981 ]
          Fix Version/s 3.5.1 [ 12326786 ]
          Michi Mutsuzaki made changes -
          Link This issue requires ZOOKEEPER-2137 [ ZOOKEEPER-2137 ]
          Hongchao Deng made changes -
          Attachment ZOOKEEPER-2000.patch [ 12703583 ]
          Hongchao Deng made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Hongchao Deng made changes -
          Description Previous changes:
                 
             testPortChange changes all ports and role of the server and thus causes existing clients to disconnect, while this wouldn't happen if only the client port changes. Need to fix it to only change client port and not all the other parameters and make sure that the clients don't disconnect, while new clients shouldn't be able to connect to the old port.

          ========
          Later changes:

          This is what I have figured out:

          * Server (1) and (2) were followers, (3) was the leader.
          * client connected to (1), did a reconfig().
          * (1) and (2) formed a quorum, reconfig was successful, and returned.
          * (3) still thinks he's the leader, so using LeaderZooKeeperServer.
          * client connected to (3) did a sync(), and the sync didn't go through a
          quorum. THE CLIENT WHO DID SYNC() GETS WRONG BEHAVIOR. There's a split
          brain here for sync().
          * Then (3) gradually moves to the new quorum config.

          I'm proposing to change sync() to need quorum acks.
          testPortChange changes all ports and role of the server and thus causes existing clients to disconnect, while this wouldn't happen if only the client port changes. Need to fix it to only change client port and not all the other parameters and make sure that the clients don't disconnect, while new clients shouldn't be able to connect to the old port.
          Hongchao Deng made changes -
          Assignee Hongchao Deng [ hdeng ] Alexander Shraer [ shralex ]
          Hongchao Deng made changes -
          Description           testPortChange changes all ports and role of the server and thus causes existing clients to disconnect, while this wouldn't happen if only the client port changes. Need to fix it to only change client port and not all the other parameters and make sure that the clients don't disconnect, while new clients shouldn't be able to connect to the old port. Previous changes:
                 
             testPortChange changes all ports and role of the server and thus causes existing clients to disconnect, while this wouldn't happen if only the client port changes. Need to fix it to only change client port and not all the other parameters and make sure that the clients don't disconnect, while new clients shouldn't be able to connect to the old port.

          ========
          Later changes:

          This is what I have figured out:

          * Server (1) and (2) were followers, (3) was the leader.
          * client connected to (1), did a reconfig().
          * (1) and (2) formed a quorum, reconfig was successful, and returned.
          * (3) still thinks he's the leader, so using LeaderZooKeeperServer.
          * client connected to (3) did a sync(), and the sync didn't go through a
          quorum. THE CLIENT WHO DID SYNC() GETS WRONG BEHAVIOR. There's a split
          brain here for sync().
          * Then (3) gradually moves to the new quorum config.

          I'm proposing to change sync() to need quorum acks.
          Hongchao Deng made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Assignee Alexander Shraer [ shralex ] Hongchao Deng [ hdeng ]
          Hongchao Deng made changes -
          Attachment ZOOKEEPER-2000.patch [ 12703583 ]
          Michi Mutsuzaki made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Michi Mutsuzaki made changes -
          Status Reopened [ 4 ] Patch Available [ 10002 ]
          Michi Mutsuzaki made changes -
          Parent ZOOKEEPER-2135 [ 12780346 ]
          Issue Type Bug [ 1 ] Sub-task [ 7 ]
          Lam Thien Son made changes -
          Link This issue is blocked by LOGGING-160 [ LOGGING-160 ]
          Patrick Hunt made changes -
          Fix Version/s 3.5.1 [ 12326786 ]
          Fix Version/s 3.6.0 [ 12326518 ]
          Fix Version/s 3.5.0 [ 12316644 ]
          Patrick Hunt made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Michi Mutsuzaki made changes -
          Description testPortChange changes all ports and role of the server and thus causes existing clients to disconnect, while this wouldn't happen if only the client port changes. Need to fix it to only change client port and not all the other parameters and make sure that the clients don't disconnect, while new clients shouldn't be able to connect to the old port.           testPortChange changes all ports and role of the server and thus causes existing clients to disconnect, while this wouldn't happen if only the client port changes. Need to fix it to only change client port and not all the other parameters and make sure that the clients don't disconnect, while new clients shouldn't be able to connect to the old port.
          Michi Mutsuzaki made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Michi Mutsuzaki made changes -
          Fix Version/s 3.5.0 [ 12316644 ]
          Fix Version/s 3.5.1 [ 12326786 ]
          Michi Mutsuzaki made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Michi Mutsuzaki made changes -
          Attachment ZOOKEEPER-2000.patch [ 12659564 ]
          Michi Mutsuzaki made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Patrick Hunt made changes -
          Fix Version/s 3.5.1 [ 12326786 ]
          Fix Version/s 3.5.0 [ 12316644 ]
          Alexander Shraer made changes -
          Attachment ZOOKEEPER-2000.patch [ 12658866 ]
          Alexander Shraer made changes -
          Fix Version/s 3.5.0 [ 12316644 ]
          Alexander Shraer made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Alexander Shraer made changes -
          Assignee Alexander Shraer [ shralex ]
          Alexander Shraer made changes -
          Component/s tests [ 12312427 ]
          Alexander Shraer made changes -
          Priority Major [ 3 ] Minor [ 4 ]
          Alexander Shraer made changes -
          Description Currently when a reconfiguration changes the client port / address of a server, clients connected to that server will be disconnected. It may be possible to avoid this.

          The relevant code is in NIOServerCnxmFactory.java, reconfigure() and NettyServerCnxnFactory.java reconfigure()
          testPortChange changes all ports and role of the server and thus causes existing clients to disconnect, while this wouldn't happen if only the client port changes. Need to fix it to only change client port and not all the other parameters and make sure that the clients don't disconnect, while new clients shouldn't be able to connect to the old port.
          Alexander Shraer made changes -
          Summary Fix ReconfigTest.testPortChange to keep Fix ReconfigTest.testPortChange
          Alexander Shraer made changes -
          Summary Fix Fix ReconfigTest.testPortChange to keep
          Alexander Shraer made changes -
          Field Original Value New Value
          Summary Avoid disconnecting existing clients on client port change Fix
          Alexander Shraer created issue -

            People

            • Assignee:
              Alexander Shraer
              Reporter:
              Alexander Shraer
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:

                Development