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

Sergey Shelukhin commented on HBASE-7831:
-----------------------------------------

What I had in mind is code like this:

{code}
 if ((currentSeqNum != null)
        && (currentSeqNum.longValue() <= seqNumBeforeFlushStarts.longValue())) {
      String errorStr = "Region " + Bytes.toString(encodedRegionName) +
          "acquired edits out of order current memstore seq=" + currentSeqNum
          + ", previous oldest unflushed id=" + seqNumBeforeFlushStarts;
      LOG.error(errorStr);
      assert false : errorStr;
      Runtime.getRuntime().halt(1);
    }{code}

or 
{code}
if (!checkFileSystem()) {
          LOG.warn("Bad Filesystem, exiting");
          Runtime.getRuntime().halt(1);
        } {code}
                
> lightweight way to make RS commit suicide
> -----------------------------------------
>
>                 Key: HBASE-7831
>                 URL: https://issues.apache.org/jira/browse/HBASE-7831
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Sergey Shelukhin
>            Priority: Minor
>
> There are times in the life of many a region server when it realizes that it 
> cannot go on any longer in the hostile, inhospitable environment. Or it might 
> realize that there's something inherently wrong with it on the inside 
> (probably because a developer screwed up). The only way out is killing itself.
> There's code in some places currently that does Runtime halt in such cases, 
> and there may be code that calls HRegionServer method to do this.
> I think we need some easy-to-access (lightweight interface, or static) way to 
> trigger reliable (no catching exceptions on the upper levels, etc.) RS death 
> in such cases.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to