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

Yu Li commented on HBASE-15324:
-------------------------------

Yep, both question and answer here are reasonable, and maybe we could simply 
use {{jitterRate > 0}} to leave the check to JDK. Below is a simple test to 
confirm JDK could make a good check:
{code}
    double x = 1e-200;
    double y = -1e-200;
    System.out.println(x>0 && y<0);
{code}

Thanks for committing this to branch-1.1/1.2 and opening the new issue 
[~esteban].

[~huaxiang] feel free to take the new JIRA if you'd like to, or I could take 
that if you prefer me to, just let me know (Smile).

> Jitter may cause desiredMaxFileSize overflow in ConstantSizeRegionSplitPolicy 
> and trigger unexpected split
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-15324
>                 URL: https://issues.apache.org/jira/browse/HBASE-15324
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 2.0.0, 1.1.3
>            Reporter: Yu Li
>            Assignee: Yu Li
>             Fix For: 2.0.0, 1.3.0, 1.4.0, 1.2.5, 1.1.8
>
>         Attachments: HBASE-15324.patch, HBASE-15324_v2.patch, 
> HBASE-15324_v3.patch, HBASE-15324_v3.patch
>
>
> We introduce jitter for region split decision in HBASE-13412, but the 
> following line in {{ConstantSizeRegionSplitPolicy}} may cause long value 
> overflow if MAX_FILESIZE is specified to Long.MAX_VALUE:
> {code}
> this.desiredMaxFileSize += (long)(desiredMaxFileSize * (RANDOM.nextFloat() - 
> 0.5D) * jitter);
> {code}
> In our case we specify MAX_FILESIZE to Long.MAX_VALUE to prevent target 
> region to split.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to