hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From syuanji...@apache.org
Subject [04/13] hbase git commit: HBASE-15101 Leaked References to StoreFile.Reader after HBASE-13082 (Deepankar)
Date Fri, 22 Jan 2016 22:19:58 GMT
HBASE-15101 Leaked References to StoreFile.Reader after HBASE-13082
(Deepankar)


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

Branch: refs/heads/hbase-12439
Commit: 93e200d52b29d35ad5a98eed9eea05783960f6b2
Parents: 55bb5ff
Author: ramkrishna <ramkrishna.s.vasudevan@gmail.com>
Authored: Wed Jan 20 11:42:13 2016 +0530
Committer: ramkrishna <ramkrishna.s.vasudevan@gmail.com>
Committed: Wed Jan 20 11:42:13 2016 +0530

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/regionserver/StoreScanner.java | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/93e200d5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
index 3049608..9ab68e4 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
@@ -407,6 +407,8 @@ public class StoreScanner extends NonReversedNonLazyKeyValueScanner
 
       if (kvs.shouldUseScanner(scan, store, expiredTimestampCutoff)) {
         scanners.add(kvs);
+      } else {
+        kvs.close();
       }
     }
     return scanners;
@@ -549,6 +551,7 @@ public class StoreScanner extends NonReversedNonLazyKeyValueScanner
         if (storeLimit > -1 && this.countPerRow > (storeLimit + storeOffset))
{
           // do what SEEK_NEXT_ROW does.
           if (!matcher.moreRowsMayExistAfter(cell)) {
+            close(false);// Do all cleanup except heap.close()
             return scannerContext.setScannerState(NextState.NO_MORE_VALUES).hasMoreValues();
           }
           matcher.curCell = null;
@@ -577,6 +580,7 @@ public class StoreScanner extends NonReversedNonLazyKeyValueScanner
 
         if (qcode == ScanQueryMatcher.MatchCode.INCLUDE_AND_SEEK_NEXT_ROW) {
           if (!matcher.moreRowsMayExistAfter(cell)) {
+            close(false);// Do all cleanup except heap.close()
             return scannerContext.setScannerState(NextState.NO_MORE_VALUES).hasMoreValues();
           }
           matcher.curCell = null;
@@ -607,6 +611,7 @@ public class StoreScanner extends NonReversedNonLazyKeyValueScanner
         // This is just a relatively simple end of scan fix, to short-cut end
         // us if there is an endKey in the scan.
         if (!matcher.moreRowsMayExistAfter(cell)) {
+          close(false);// Do all cleanup except heap.close()
           return scannerContext.setScannerState(NextState.NO_MORE_VALUES).hasMoreValues();
         }
         matcher.curCell = null;


Mime
View raw message