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

stack commented on HBASE-1609:
------------------------------

I see that in HRegionServer#next, we do a checkOpen and will do the below:

{code}
  protected void checkOpen() throws IOException {
    if (this.stopRequested.get() || this.abortRequested) {
      throw new IOException("Server not running" +
        (this.abortRequested? ", aborting": ""));
    }
    if (!fsOk) {
      throw new IOException("File system not available");
    }
  }
{code}

... sending an IOE back to the scanner -- but we're not cancelling its lease.  
Cancelling lease would help some at least in case where Scanners are active.

But for inactives scanners -- e.g. a killed client -- we'd still be waiting 
around.

Regards Ryan's refusing new requests but finishing the outstanding, a get takes 
out a row lock which also takes a splitsAndClosesLock.readLock().lock();.... so 
you can't close region while a get is going on (it needs to get the write lock 
here).

Individual put does the same.

A scanner next does not take out the splitsAndCloses lock.  I suppose it never 
had too because scanner can ride over splits and we'd never close while 
outstanding lease.

Lets make it so next takes at least a close lock.  Then in actual shutdown, 
cancel all leases and not wait on any.  This should make it so at least the 
current scanner next completes but all subsequent next's will be rejected.

> [part of hbase-1583] We wait on leases to expire before regionserver goes 
> down.  Rather, just let client fail
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-1609
>                 URL: https://issues.apache.org/jira/browse/HBASE-1609
>             Project: Hadoop HBase
>          Issue Type: Improvement
>            Reporter: stack
>             Fix For: 0.20.0
>
>         Attachments: 1609.patch
>
>
> Addressing this issue will help hbase-1583.  We should do for 0.20.0 and 
> perhaps for 0.19.x even.
> Currently, if outstanding leases, in HRegion close, we'll hang until lease 
> expires.  Could be a minute.  Could be worse, the client might come in and 
> renew the lease a few times at least till it finishes out the region.  This 
> gets in way of regionserver shutting down fast.  
> J-D suggests that regionserver should just go down and outstanding clients 
> should fail rather than try and be nice to outstanding clients (in his case, 
> his MR job had failed so no clients... but we insist on lease expiring).

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

Reply via email to