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

[jira] Updated: (HBASE-1857) WrongRegionException when setting region online after .META. split

     [ https://issues.apache.org/jira/browse/HBASE-1857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Cosmin Lehene updated HBASE-1857:
---------------------------------

    Attachment: 0001-fixed-WrongRegionException-bug-when-splitting-.META.patch
                0002-Adding-tests-for-WrongRegionException-bug-when-split.patch

Adding a unit test and the patch. 

The unit test is semi-functional actually. It doesn't split the .META. table, but rather using the RegionManager methods to put and get regions in and out of the map. 

> WrongRegionException when setting region online after .META. split
> ------------------------------------------------------------------
>
>                 Key: HBASE-1857
>                 URL: https://issues.apache.org/jira/browse/HBASE-1857
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: master
>    Affects Versions: 0.20.0
>         Environment: OSX/Linux
>            Reporter: Cosmin Lehene
>             Fix For: 0.20.1
>
>         Attachments: 0001-fixed-WrongRegionException-bug-when-splitting-.META.patch, 0002-Adding-tests-for-WrongRegionException-bug-when-split.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> After splitting .META. when updating region information in .META. (e.g. ProcessRegionOpen) the wrong .META. region was retrieved in RegionManager from onlineMetaRegions map. 
> This is due to a bug in RegionManager.getFirstMetaRegionForRegion that was using the wrong key to get data out of the map (the table name instead of the region name) 
> return onlineMetaRegions.get(onlineMetaRegions.headMap(newRegion.getTableDesc().getName()).lastKey());
> and when adding the region to the map it was added with 
> onlineMetaRegions.put(metaRegion.getStartKey(), metaRegion);
> so it's supposed to be taken out with: 
> return onlineMetaRegions.get(onlineMetaRegions.headMap(newRegion.getRegionName()).lastKey());

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