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:08:04 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 d1bdd68a8 -> 805fcc634


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/805fcc63
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/805fcc63
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/805fcc63

Branch: refs/heads/branch-1.2
Commit: 805fcc63466ed79760e4b41d62c6d5c7fe59d7c9
Parents: d1bdd68
Author: tedyu <yuzhihong@gmail.com>
Authored: Fri Nov 6 12:07:59 2015 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Fri Nov 6 12:07:59 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/805fcc63/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 8f061a5..083b16d 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
@@ -2123,7 +2123,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;
   }
@@ -2133,6 +2137,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