[ 
https://issues.apache.org/jira/browse/HBASE-5121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13181791#comment-13181791
 ] 

Zhihong Yu commented on HBASE-5121:
-----------------------------------

w.r.t. introducing new exception, here is StoreScanner.next():
{code}
   * @return true if there are more rows, false if scanner is done
   */
  @Override
  public synchronized boolean next(List<KeyValue> outResult, int limit) throws 
IOException {

    checkReseek();
{code}
The return value has clear meaning. One approach is to change return type to an 
enum.

@Chunhui:
Do you have time to come up with a patch that doesn't rely on new exception. 
Instead, it relies on StoreScanner.next() returning an enum (SCAN_DONE, 
MORE_ROWS, PEEK_CHANGED).
This way, people can evaluate both approaches.

Of course, Stack and Todd may comment on other areas of the patch.
                
> MajorCompaction may affect scan's correctness
> ---------------------------------------------
>
>                 Key: HBASE-5121
>                 URL: https://issues.apache.org/jira/browse/HBASE-5121
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: chunhui shen
>            Assignee: chunhui shen
>            Priority: Critical
>             Fix For: 0.94.0, 0.92.1, 0.90.6
>
>         Attachments: 5121-trunk-combined.txt, 5121.90, 
> hbase-5121-testcase.patch, hbase-5121.patch, hbase-5121v2.patch
>
>
> In our test, there are two families' keyvalue for one row.
> But we could find a infrequent problem when doing scan's next if 
> majorCompaction happens concurrently.
> In the client's two continuous doing scan.next():
> 1.First time, scan's next returns the result where family A is null.
> 2.Second time, scan's next returns the result where family B is null.
> The two next()'s result have the same row.
> If there are more families, I think the scenario will be more strange...
> We find the reason is that storescanner.peek() is changed after 
> majorCompaction if there are delete type KeyValue.
> This change causes the PriorityQueue<KeyValueScanner> of RegionScanner's heap 
> is not sure to be sorted.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to