HBASE-14632 Region server aborts due to unguarded dereference of Reader
This commit is contained in:
parent
bfa3689190
commit
6ec4a96814
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue