Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-23356

When construct StoreScanner throw exceptions it is possible to left some KeyValueScanner not closed.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-alpha-1, 2.3.0, 2.2.3, 2.1.9
    • None
    • None

    Description

          try {
            // Pass columns to try to filter out unnecessary StoreFiles.
            List<KeyValueScanner> scanners = selectScannersFrom(store,
              store.getScanners(cacheBlocks, scanUsePread, false, matcher, scan.getStartRow(),
                scan.includeStartRow(), scan.getStopRow(), scan.includeStopRow(), this.readPt));
      
            // Seek all scanners to the start of the Row (or if the exact matching row
            // key does not exist, then to the start of the next matching Row).
            // Always check bloom filter to optimize the top row seek for delete
            // family marker.
            seekScanners(scanners, matcher.getStartKey(), explicitColumnQuery && lazySeekEnabledGlobally,
              parallelSeekEnabled);
          
              ......
          } catch (IOException e) {
            // remove us from the HStore#changedReaderObservers here or we'll have no chance to
            // and might cause memory leak
            store.deleteChangedReaderObserver(this);
            throw e;
          }
      

      Like the above, if the seekScanners(scanners,...) throws exception, the scanners do not closed, we need to close the scanners.

      Attachments

        Issue Links

          Activity

            People

              binlijin Lijin Bin
              binlijin Lijin Bin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: