[ https://issues.apache.org/jira/browse/HBASE-8152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13615998#comment-13615998 ]
clockfly commented on HBASE-8152: --------------------------------- {quote} // pick an split point (roughly halfway) - byte[] SPLITKEY = new byte[] { (LAST_CHAR-FIRST_CHAR)/2, FIRST_CHAR}; + byte[] SPLITKEY = new byte[] { (LAST_CHAR + FIRST_CHAR)/2, FIRST_CHAR}; {quote} {quote} How did this work before? {quote} Sergey, actually this is hidden bug in old version, it accidently worked, because the split key lies outside the store file by "LAST_CHAR-FIRST_CHAR)/2", and there was also a bug in the counter which miss adding 1 count. These two bugs make the old UT pass. I should make this another Jira to make it more clear. > Avoid creating empty reference file when splitkey is outside the range of a > store file > -------------------------------------------------------------------------------------- > > Key: HBASE-8152 > URL: https://issues.apache.org/jira/browse/HBASE-8152 > Project: HBase > Issue Type: Improvement > Components: Filesystem Integration, HFile > Affects Versions: 0.94.5 > Reporter: clockfly > Assignee: clockfly > Priority: Trivial > Fix For: 0.94.7 > > Attachments: hbase-8152.0.94patch.v2, hbase-8152.patch0.94 > > > When splitting a store file, if the split key is before the first key, or > greater than the last key, then only one reference file should be created. > Currently, two reference file will be created. -- 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