Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1197

Incorrect socket handling of 4 letter words for NIO

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Won't Fix
    • 3.3.3, 3.4.0
    • 3.5.0
    • server
    • None
    • 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

      Attachments

        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

            People

              fournc Camille Fournier
              fournc Camille Fournier
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: