Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-13330

ShortCircuitCache#fetchOrCreate never retries

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.0, 3.1.1, 3.0.3
    • Component/s: None
    • Labels:
      None

      Description

      The follow do .. while(false) loop seems useless to me. The code intended to retry but it never worked. Let's fix it.

      ShortCircuitReplicaInfo info = null;
      do {
        if (closed) {
          LOG.trace("{}: can't fethchOrCreate {} because the cache is closed.",
              this, key);
          return null;
        }
        Waitable<ShortCircuitReplicaInfo> waitable = replicaInfoMap.get(key);
        if (waitable != null) {
          try {
            info = fetch(key, waitable);
          } catch (RetriableException e) {
            LOG.debug("{}: retrying {}", this, e.getMessage());
          }
        }
      } while (false);

        Attachments

        1. HDFS-13330.branch-2.patch
          5 kB
          Wei-Chiu Chuang
        2. HDFS-13330.005.patch
          5 kB
          Gabor Bota
        3. HDFS-13330.004.patch
          5 kB
          Gabor Bota
        4. HDFS-13330.002.patch
          1 kB
          Gabor Bota
        5. HDFS-13330.001.patch
          2 kB
          Gabor Bota

          Activity

            People

            • Assignee:
              gabor.bota Gabor Bota
              Reporter:
              jojochuang Wei-Chiu Chuang
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: