You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "stack (JIRA)" <ji...@apache.org> on 2009/07/18 03:28:14 UTC

[jira] Created: (HBASE-1671) HBASE-1609 broke scanners riding across splits

HBASE-1609 broke scanners riding across splits
----------------------------------------------

                 Key: HBASE-1671
                 URL: https://issues.apache.org/jira/browse/HBASE-1671
             Project: Hadoop HBase
          Issue Type: Bug
            Reporter: stack
             Fix For: 0.20.0


On split, we close region and close out scanner leases.  Scanners coming in get USEs instead of NSREs.  Fix.  Broke by hbase-1609.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1671) HBASE-1609 broke scanners riding across splits

Posted by "Jean-Daniel Cryans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736177#action_12736177 ] 

Jean-Daniel Cryans commented on HBASE-1671:
-------------------------------------------

+1

I did not test it but from what I see it does the right thing, also it adds a test case. Waiting for a scanner to finish before splitting is dangerous IMO, imagine a job that writes inside a table it scans... could take a long time before it finishes and we could get very big regions! So now with the client handling that we should have a better story.

Some nitpicks, some classes have unused imports after this patch like HCM and I also wonder why you use org.mortbay.log.Log inside ScannerCallable as we never used that class anywhere else.

> HBASE-1609 broke scanners riding across splits
> ----------------------------------------------
>
>                 Key: HBASE-1671
>                 URL: https://issues.apache.org/jira/browse/HBASE-1671
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: stack
>             Fix For: 0.20.0
>
>         Attachments: 1671-v2.patch, 1671-v3.patch, 1671.patch
>
>
> On split, we close region and close out scanner leases.  Scanners coming in get USEs instead of NSREs.  Fix.  Broke by hbase-1609.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-1671) HBASE-1609 broke scanners riding across splits

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-1671:
-------------------------

    Attachment: 1671-v3.patch

Posting patch for J-D review.

Here's the story.

Previous, splitting, we would not close the region until all outstanding scanners were done.

Philosophy is not to wait any more. HBASE-1609 did some of that work undoing waits on scanner leases.

Remaining was how to deal with case where region split undering an outstanding scanner.  As per above, we punted dealing with this in past.

This patch moves handling the scanner across region splits to the client.

First, server-side, if a next is called on a region the regionserver has since closed, we now return a NSRE (and close out the scanner that was).

Client-side, its kinda ugly because ScannerCallable is in the way.  On one hand we want the retrying but only sometimes.  We don't want to retry an NSRE on a next.  A NSRE inside in a scanner next will never recover.  Whats wanted is a scanner reset where scanner goes and figures new location of region.  Location figuring only happens inside in scanner open so we need to reopen scanner.

We can't reset down in ScannerCallable.  Reset has to happen higher up where there is more context inside in the ClientScanner#next.

So we have ugly mechanism for sending a signal from ScannerCallable up to ClientScanner#next using a DoRetryException caused by a NSRE.

Once the scanner has been reset, we need to discard first row since we've already returned this.





> HBASE-1609 broke scanners riding across splits
> ----------------------------------------------
>
>                 Key: HBASE-1671
>                 URL: https://issues.apache.org/jira/browse/HBASE-1671
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: stack
>             Fix For: 0.20.0
>
>         Attachments: 1671-v2.patch, 1671-v3.patch, 1671.patch
>
>
> On split, we close region and close out scanner leases.  Scanners coming in get USEs instead of NSREs.  Fix.  Broke by hbase-1609.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HBASE-1671) HBASE-1609 broke scanners riding across splits

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack resolved HBASE-1671.
--------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]

Thanks for review J-D.

> HBASE-1609 broke scanners riding across splits
> ----------------------------------------------
>
>                 Key: HBASE-1671
>                 URL: https://issues.apache.org/jira/browse/HBASE-1671
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: stack
>             Fix For: 0.20.0
>
>         Attachments: 1671-v2.patch, 1671-v3.patch, 1671.patch
>
>
> On split, we close region and close out scanner leases.  Scanners coming in get USEs instead of NSREs.  Fix.  Broke by hbase-1609.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1671) HBASE-1609 broke scanners riding across splits

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736178#action_12736178 ] 

stack commented on HBASE-1671:
------------------------------

Latter was mistake on my part.  Will fix up imports before committing.  Thanks for review J-D.

> HBASE-1609 broke scanners riding across splits
> ----------------------------------------------
>
>                 Key: HBASE-1671
>                 URL: https://issues.apache.org/jira/browse/HBASE-1671
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: stack
>             Fix For: 0.20.0
>
>         Attachments: 1671-v2.patch, 1671-v3.patch, 1671.patch
>
>
> On split, we close region and close out scanner leases.  Scanners coming in get USEs instead of NSREs.  Fix.  Broke by hbase-1609.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1671) HBASE-1609 broke scanners riding across splits

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12732981#action_12732981 ] 

stack commented on HBASE-1671:
------------------------------

Hmm.... looking, this ain't as bad as I thought but behavior is a little indeterminate; i don't see a check to see if region is closing or closed.

> HBASE-1609 broke scanners riding across splits
> ----------------------------------------------
>
>                 Key: HBASE-1671
>                 URL: https://issues.apache.org/jira/browse/HBASE-1671
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: stack
>             Fix For: 0.20.0
>
>
> On split, we close region and close out scanner leases.  Scanners coming in get USEs instead of NSREs.  Fix.  Broke by hbase-1609.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-1671) HBASE-1609 broke scanners riding across splits

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-1671:
-------------------------

    Attachment: 1671.patch

Dirty patch, has loads of debugging.

So, adds test of scanners riding over splits and adds at least one necessary fix but not done yet.

If scanner outstanding while split we get a NSRE; we never recover.  Trying to fix that now.

> HBASE-1609 broke scanners riding across splits
> ----------------------------------------------
>
>                 Key: HBASE-1671
>                 URL: https://issues.apache.org/jira/browse/HBASE-1671
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: stack
>             Fix For: 0.20.0
>
>         Attachments: 1671.patch
>
>
> On split, we close region and close out scanner leases.  Scanners coming in get USEs instead of NSREs.  Fix.  Broke by hbase-1609.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-1671) HBASE-1609 broke scanners riding across splits

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-1671:
-------------------------

    Attachment: 1671-v2.patch

Still not done.

> HBASE-1609 broke scanners riding across splits
> ----------------------------------------------
>
>                 Key: HBASE-1671
>                 URL: https://issues.apache.org/jira/browse/HBASE-1671
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: stack
>             Fix For: 0.20.0
>
>         Attachments: 1671-v2.patch, 1671.patch
>
>
> On split, we close region and close out scanner leases.  Scanners coming in get USEs instead of NSREs.  Fix.  Broke by hbase-1609.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.