Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-18397 StoreFile accounting issues on branch-1.3 and branch-1
  3. HBASE-19502

Make sure we have closed all StoreFileScanners if we fail to open any StoreFileScanners

    Details

    • Hadoop Flags:
      Reviewed

      Description

      StoreFileScanner.java
        public static List<StoreFileScanner> getScannersForStoreFiles(Collection<StoreFile> files,
            boolean cacheBlocks, boolean usePread, boolean isCompaction, boolean canUseDrop,
            ScanQueryMatcher matcher, long readPt, boolean isPrimaryReplica) throws IOException {
          List<StoreFileScanner> scanners = new ArrayList<StoreFileScanner>(files.size());
          List<StoreFile> sorted_files = new ArrayList<>(files);
          Collections.sort(sorted_files, StoreFile.Comparators.SEQ_ID);
          for (int i = 0; i < sorted_files.size(); i++) {
            StoreFile.Reader r = sorted_files.get(i).createReader(canUseDrop);
            r.setReplicaStoreFile(isPrimaryReplica);
            StoreFileScanner scanner = r.getStoreFileScanner(cacheBlocks, usePread, isCompaction, readPt,
              i, matcher != null ? !matcher.hasNullColumnInQuery() : false);
            scanners.add(scanner);
          }
          return scanners;
        }
      

      The missed decrement of ref count will obstruct the cleanup of compacted files.

        Attachments

        1. HBASE-19502.branch-1.4.patch
          2 kB
          Chia-Ping Tsai
        2. HBASE-19502.v0.patch
          2 kB
          Chia-Ping Tsai

          Activity

            People

            • Assignee:
              chia7712 Chia-Ping Tsai
              Reporter:
              chia7712 Chia-Ping Tsai
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: