This is an automated email from the ASF dual-hosted git repository.

apurtell pushed a commit to branch branch-1.3
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-1.3 by this push:
     new 9daa108  HBASE-22520 Avoid possible NPE while performing seekBefore in 
HalfStoreFileReader
9daa108 is described below

commit 9daa1082584bfd0975398c6a4d9fb822d9264cd8
Author: virajjasani <[email protected]>
AuthorDate: Fri Jun 7 04:13:36 2019 +0530

    HBASE-22520 Avoid possible NPE while performing seekBefore in 
HalfStoreFileReader
    
    Conflicts:
        
hbase-server/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java
    
    Co-authored-by: Andrew Purtell <[email protected]>
---
 .../src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java
index c259fc2..972c3b5 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java
@@ -297,7 +297,7 @@ public class HalfStoreFileReader extends StoreFile.Reader {
       public boolean seekBefore(Cell key) throws IOException {
         if (top) {
           Cell fk = new KeyValue.KeyOnlyKeyValue(getFirstKey(), 0, 
getFirstKey().length);
-          if (getComparator().compareOnlyKeyPortion(key, fk) <= 0) {
+          if (fk != null && getComparator().compareOnlyKeyPortion(key, fk) <= 
0) {
             return false;
           }
         } else {

Reply via email to