Apache9 commented on pull request #3688:
URL: https://github.com/apache/hbase/pull/3688#issuecomment-925854591


   I tried to move this block of code
   ```
                 if (storeLimit > -1 && this.countPerRow >= (storeLimit + 
storeOffset)) {
                   // do what SEEK_NEXT_ROW does.
                   if (!matcher.moreRowsMayExistAfter(cell)) {
                     close(false);// Do all cleanup except heap.close()
                     return 
scannerContext.setScannerState(NextState.NO_MORE_VALUES).hasMoreValues();
                   }
                   matcher.clearCurrentRow();
                   seekToNextRow(cell);
                   break LOOP;
                 }
   ```
   
   Into the `if (this.countPerRow > storeOffset) {` block, at the last of this 
if block.
   
   And also, changed the condition from `this.countPerRow > (storeLimit + 
storeOffset)` to `this.countPerRow >= (storeLimit + storeOffset)`. It could 
also pass the added UT.
   
   Not sure if there are other side effects... Let me try to run all the UTs 
with this patch.
   
   For me, it is a bit strange that why we need to read an extra cell and then 
drop it, why not just break the LOOP when we get enough cells. That's why I 
changed the condition from > to >=.
   
   Thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to