You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Esteban Gutierrez (JIRA)" <ji...@apache.org> on 2017/08/08 21:39:00 UTC
[jira] [Commented] (HBASE-18024) HRegion#initializeRegionInternals
should not re-create .hregioninfo file when the region directory no longer
exists
[ https://issues.apache.org/jira/browse/HBASE-18024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16119068#comment-16119068 ]
Esteban Gutierrez commented on HBASE-18024:
-------------------------------------------
New patch adds an extra step in {{HRegion.initializeRegionInternals(}}:
{code}
if (this.getRegionInfo().getReplicaId() == HRegionInfo.DEFAULT_REPLICA_ID) {
status.setStatus("Writing region info on filesystem");
fs.checkRegionInfoOnFilesystem();
}
{code}
Which basically only allows the primary replica to create a new {{.regioninfo}} when a region is instantiated.
> HRegion#initializeRegionInternals should not re-create .hregioninfo file when the region directory no longer exists
> -------------------------------------------------------------------------------------------------------------------
>
> Key: HBASE-18024
> URL: https://issues.apache.org/jira/browse/HBASE-18024
> Project: HBase
> Issue Type: Bug
> Components: Region Assignment, regionserver
> Affects Versions: 2.0.0, 1.4.0, 1.3.1, 1.2.5
> Reporter: Esteban Gutierrez
> Assignee: Esteban Gutierrez
> Attachments: HBASE-18024.001.patch, HBASE-18024.002.patch
>
>
> When a RegionSever attempts to open a region, during initialization the RS tries to open the {{<hbase.root.dir>/data/<table>/<region>/.hregioninfo}} file, however if the {{.hregioninfofile}} doesn't exist, the RegionServer will create a new one on {{HRegionFileSystem#checkRegionInfoOnFilesystem}}. A side effect of that tools like hbck will incorrectly assume an inconsistency due the presence of this new {{.hregioninfofile}}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)