hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-14632 Region server aborts due to unguarded dereference of Reader
Date Fri, 06 Nov 2015 20:06:24 GMT
Repository: hbase
Updated Branches:
  refs/heads/master bfa368919 -> 6ec4a9681


HBASE-14632 Region server aborts due to unguarded dereference of Reader


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

Branch: refs/heads/master
Commit: 6ec4a968144b7dfcbddcd3648e6139c985044e41
Parents: bfa3689
Author: tedyu <yuzhihong@gmail.com>
Authored: Fri Nov 6 12:06:19 2015 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Fri Nov 6 12:06:19 2015 -0800

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/regionserver/HStore.java   | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/6ec4a968/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
index 1d996b2..133a5d9 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
@@ -1998,7 +1998,11 @@ public class HStore implements Store {
   public long getTotalStaticIndexSize() {
     long size = 0;
     for (StoreFile s : this.storeEngine.getStoreFileManager().getStorefiles()) {
-      size += s.getReader().getUncompressedDataIndexSize();
+      StoreFile.Reader r = s.getReader();
+      if (r == null) {
+        continue;
+      }
+      size += r.getUncompressedDataIndexSize();
     }
     return size;
   }
@@ -2008,6 +2012,9 @@ public class HStore implements Store {
     long size = 0;
     for (StoreFile s : this.storeEngine.getStoreFileManager().getStorefiles()) {
       StoreFile.Reader r = s.getReader();
+      if (r == null) {
+        continue;
+      }
       size += r.getTotalBloomSize();
     }
     return size;


Mime
View raw message