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

libhdfs++: Get rid of lock in RpcConnectionImpl destructor

    XMLWordPrintableJSON

Details

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

    Description

      The destructor to RpcConnectionImpl grabs a lock using a std::lock_guard<>.

      It turns out something is already holding the lock when this happens. Best bet is something that looks like:

      void SomeFunctionThatShouldntTakeLock(){
        std::lock_guard<std::mutex> bad(connection_state_lock_)
        conn_.reset(); //conn is a shared_ptr to RpcConnectionImpl
      }
      

      Attachments

        1. HDFS-10409.HDFS-8707.000.patch
          0.9 kB
          James Clampffer
        2. HDFS-10409.HDFS-8707.001.patch
          12 kB
          James Clampffer
        3. locked_dtor.patch
          1 kB
          James Clampffer

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: