Skip to content

Commit

Permalink
Fewer insidePrevKey calls
Browse files Browse the repository at this point in the history
Only the first key read in a batch will be compared to prevKey.
  • Loading branch information
tinwelint committed Oct 11, 2018
1 parent 7816827 commit a5536f5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ private boolean readAndValidateNextKeyValueBatch() throws IOException
if ( insideEndRange( exactMatch, cachedLength ) )
{
// This seems to be a result that should be part of our result set
if ( insidePrevKey( cachedLength ) )
if ( cachedLength > 0 /*no need to check "inside prev" for consecutive keys*/ || insidePrevKey( cachedLength ) )
{
cachedLength++;
}
Expand Down

0 comments on commit a5536f5

Please sign in to comment.