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

Wellington Chevreuil commented on HBASE-22567:
----------------------------------------------

Hi [~stack], thanks for pointing out HBASE-22680. Some thoughts below 
{quote}Sean Busbey asks in review of HBASE-22680 if overlap with the work here. 
Let me review your latest but I don't think so (correct me if I'm wrong). The 
patch here works against an online meta selectively making fixes, posing as a 
"...a lighter version of 'OfflineMetaRepair'". HBASE-22680 does a brute, 
wholesale rewrite of meta w/ the cluster offline.
{quote}
Yeah, although it re-adds missing regions to meta in a much simpler way, 
relying that meta is available and online, I feel that a ported offline meta 
repair would maybe made it redundant.

I came out with this approach due to growing number of support issues where 
some regions are missing in meta, but meta is online. All we needed in those 
cases was a mean to re-add those regions. I found much easier to re-implement a 
basic command that does just _meta re-add_, than try to port offline meta 
repair. Also thought as the ideal approach for hbck2, to only implement fixes 
for identified issues, so the extra stuff in offline meta repair may not be 
relevant. And in all the cases this problem occurred, the cause was actually 
the offline meta repair issue described in HBASE-21665. Those were the cases 
where customer cluster faced an assignment/master startup issue, operator 
realised hbck1 became readonly in hbase 2, wasn't aware of hbck2, then panic 
and run offline meta repair, which is broken. [~brfrn169] had started a 
discussion about removing offline meta repair from hbase project.
{quote}When I asked above, you said this patch could perhaps evolve to subsume 
OfflineMetaRepair. When that is the case, we could remove HBASE-22680 – or keep 
it for when a radical cure is wanted. What you reckon?
{quote}
Yeah, my idea was to incrementally add new features (such as the table info 
entry re-add), once we started to face those on hbase 2. But I guess if 
HBASE-22680 already brings us with a ported offline meta repair in hbck2, ain't 
sure there's much reason to keep investing on this one here, maybe we should 
rather abandon this HBASE-22567?

> HBCK2 addMissingRegionsToMeta
> -----------------------------
>
>                 Key: HBASE-22567
>                 URL: https://issues.apache.org/jira/browse/HBASE-22567
>             Project: HBase
>          Issue Type: New Feature
>          Components: hbck2
>            Reporter: Wellington Chevreuil
>            Assignee: Wellington Chevreuil
>            Priority: Major
>
> Following latest discussion on HBASE-21745, this proposes an hbck2 command 
> that allows for inserting back regions missing in META that still have 
> *regioninfo* available in HDFS. Although this is still an interactive and 
> simpler version than the old _OfflineMetaRepair_, it still relies on hdfs 
> state as the source of truth, and performs META updates mostly independently 
> from Master (apart from requiring Meta table been online).
> For a more detailed explanation on this command behaviour, pasting _command 
> usage_ text:
> {noformat}
> To be used for scenarios where some regions may be missing in META,
> but there's still a valid 'regioninfo' metadata file on HDFS.
> This is a lighter version of 'OfflineMetaRepair' tool commonly used for
> similar issues on 1.x release line.
> This command needs META to be online. For each table name passed as
> parameter, it performs a diff between regions available in META,
> against existing regions dirs on HDFS. Then, for region dirs with
> no matches in META, it reads regioninfo metadata file and
> re-creates given region in META. Regions are re-created in 'CLOSED'
> state at META table only, but not in Masters' cache, and are not
> assigned either. A rolling Masters restart, followed by a
> hbck2 'assigns' command with all re-inserted regions is required.
> This hbck2 'assigns' command is printed for user convenience.
> WARNING: To avoid potential region overlapping problems due to ongoing
> splits, this command disables given tables while re-inserting regions.
> An example adding missing regions for tables 'table_1' and 'table_2':
> $ HBCK2 addMissingRegionsInMeta table_1 table_2
> Returns hbck2 'assigns' command with all re-inserted regions.{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to