Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-12615 Router-based HDFS federation phase 2
  3. HDFS-13232

RBF: ConnectionPool should return first usable connection

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.1.0, 2.10.0, 2.9.1, 3.0.3
    • None
    • None
    • Reviewed

    Description

      In current ConnectionPool.getConnection(), it will return the first active connection:

      for (int i=0; i<size; i++) {
        int index = (threadIndex + i) % size;
        conn = tmpConnections.get(index);
        if (conn != null && !conn.isUsable()) {
          return conn;
        }
      }
      

      Here "!conn.isUsable()" should be "conn.isUsable()".

      Attachments

        1. HDFS-13232.001.patch
          3 kB
          Ekanth Sethuramalingam
        2. HDFS-13232.002.patch
          4 kB
          Ekanth Sethuramalingam
        3. HDFS-13232.003.patch
          4 kB
          Ekanth Sethuramalingam

        Issue Links

          Activity

            People

              ekanth Ekanth Sethuramalingam
              ywskycn Wei Yan
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: