ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1197

Incorrect socket handling of 4 letter words for NIO

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Won't Fix
    • Affects Version/s: 3.3.3, 3.4.0
    • Fix Version/s: 3.5.0
    • Component/s: server
    • Labels:
      None
    • Release Note:
      Hide
      We'll address the problem in ZOOKEEPER-1346 by moving the 4lws to a separate port.
      Show
      We'll address the problem in ZOOKEEPER-1346 by moving the 4lws to a separate port.

      Description

      When transferring a large amount of information from a 4 letter word, especially in interactive mode (telnet or nc) over a slower network link, the connection can be closed before all of the data has reached the client. This is due to the way we handle nc non-interactive mode, by cancelling the selector key.

      Instead of cancelling the selector key for 4-letter-words, we should instead flag the NIOServerCnxn to ignore detection of a close condition on that socket (CancelledKeyException, EndOfStreamException). Since the 4lw will close the connection immediately upon completion, this should be safe to do.

      See ZOOKEEPER-737 for more details

      1. long_4lw.patch
        2 kB
        Skye Wanderman-Milne
      2. ZOOKEEPER-1197_shutdown.patch
        1 kB
        Skye Wanderman-Milne
      3. ZOOKEEPER-1197.patch
        7 kB
        Camille Fournier

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Camille Fournier
              Reporter:
              Camille Fournier
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development