Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-8707 Implement an async pure c++ HDFS client
  3. HDFS-10311

libhdfs++: DatanodeConnection::Cancel should not delete the underlying socket

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • hdfs-client
    • None

    Description

      DataNodeConnectionImpl calls reset on the unique_ptr that references the underlying asio::tcp::socket. If this happens after the continuation pipeline checks the cancel state but before asio uses the socket it will segfault because unique_ptr::reset will explicitly change it's value to nullptr.

      Cancel should only call shutdown() and close() on the socket but keep the instance of it alive. The socket can probably also be turned into a member of DataNodeConnectionImpl to get rid of the unique pointer and simplify things a bit.

      Attachments

        1. HDFS-10311.HDFS-8707.000.patch
          7 kB
          James Clampffer
        2. HDFS-10311.HDFS-8707.001.patch
          7 kB
          James Clampffer
        3. HDFS-10311.HDFS-8707.002.patch
          8 kB
          James Clampffer

        Activity

          People

            James Clampffer James Clampffer
            James Clampffer James Clampffer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: