HBASE-15884 NPE in StoreFileScanner#skipKVsNewerThanReadpoint during reverse scan (Sergey Soldatov)

This commit is contained in:
tedyu 2016-05-25 17:29:32 -07:00
parent 2346b5e216
commit a049b5f799
1 changed files with 2 additions and 2 deletions

View File

@ -257,9 +257,9 @@ public class StoreFileScanner implements KeyValueScanner {
while(enforceMVCC
&& cur != null
&& (cur.getMvccVersion() > readPt)) {
hfs.next();
boolean hasNext = hfs.next();
setCurrentCell(hfs.getKeyValue());
if (this.stopSkippingKVsIfNextRow
if (hasNext && this.stopSkippingKVsIfNextRow
&& getComparator().compareRows(cur.getRowArray(), cur.getRowOffset(),
cur.getRowLength(), startKV.getRowArray(), startKV.getRowOffset(),
startKV.getRowLength()) > 0) {