Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.3 ae3618ff8 -> af4b81768


PHOENIX-4505 IndexHalfStoreFileReaderGenerator.preStoreScannerOpen does not 
close the passed in KeyValueScanner while creating and returning a new scanner


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/af4b8176
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/af4b8176
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/af4b8176

Branch: refs/heads/4.x-HBase-1.3
Commit: af4b81768fed870573b51740c21cdf868d185ab2
Parents: ae3618f
Author: Thomas D'Silva <tdsi...@apache.org>
Authored: Thu Mar 15 13:18:24 2018 -0700
Committer: Thomas D'Silva <tdsi...@apache.org>
Committed: Fri Mar 16 14:21:30 2018 -0700

----------------------------------------------------------------------
 .../regionserver/IndexHalfStoreFileReaderGenerator.java     | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/af4b8176/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReaderGenerator.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReaderGenerator.java
 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReaderGenerator.java
index 88154a7..140b0ba 100644
--- 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReaderGenerator.java
+++ 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReaderGenerator.java
@@ -210,6 +210,9 @@ public class IndexHalfStoreFileReaderGenerator extends 
BaseRegionObserver {
                 }
             }
             if (repairScanner != null) {
+                if (s!=null) {
+                    s.close();
+                }
                 return repairScanner;
             } else {
                 return s;
@@ -227,6 +230,9 @@ public class IndexHalfStoreFileReaderGenerator extends 
BaseRegionObserver {
                 newScanners.add(((StoreFileScanner) scanner));
             }
         }
+        if (s!=null) {
+            s.close();
+        }
         return new StoreScanner(store, store.getScanInfo(), scan, newScanners,
             scanType, store.getSmallestReadPoint(), earliestPutTs);
     }
@@ -311,6 +317,9 @@ public class IndexHalfStoreFileReaderGenerator extends 
BaseRegionObserver {
                 && store.hasReferences()) {
             final long readPt = 
c.getEnvironment().getRegion().getReadpoint(scan.getIsolationLevel
                     ());
+            if (s!=null) {
+                s.close();
+            }
             if (!scan.isReversed()) {
                 return new StoreScanner(store, store.getScanInfo(), scan,
                         targetCols, readPt) {

Reply via email to