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 21:40:17 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 c69c74fcb -> c1a19dece


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

Branch: refs/heads/branch-1
Commit: c1a19dece03bc6696dbfbb69e801959f16ab69e9
Parents: c69c74f
Author: tedyu <yuzhihong@gmail.com>
Authored: Fri Nov 6 13:40:14 2015 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Fri Nov 6 13:40:14 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/c1a19dec/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