[
https://issues.apache.org/jira/browse/HBASE-28376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17819196#comment-17819196
]
Duo Zhang commented on HBASE-28376:
-----------------------------------
Ah, there is dead lock if we still want to follow the old implementation, i.e,
wait until the migration done before returning from TableNamespaceManager.start.
The problem is that, now we need to schedule a ModifyTableProcedure to add a
family to hbase:meta(this is necessary, as now the region server which hosts
the meta region does not add the family automatically, we need to follow the
normal alter table way, where we need to update the table descriptor on file
system and then reopen the region), but the procedure can only be executed when
master is fully initialized, where starting TableNamespaceManager is part of
the initialization process...
I think a possible solution is to make the TableNamespaceManager read only
while migrating, i.e, you can not add/delete/modify namespace during the
migration. I think this is acceptable as changing namespace should not be a
frequent operation, and usually namespace table is very small so the migration
should be finished soon.
Thanks.
> Column family ns does not exist in region during upgrade to 3.0.0-beta-2
> ------------------------------------------------------------------------
>
> Key: HBASE-28376
> URL: https://issues.apache.org/jira/browse/HBASE-28376
> Project: HBase
> Issue Type: Bug
> Components: meta
> Affects Versions: 3.0.0-beta-1
> Reporter: Bryan Beaudreault
> Assignee: Duo Zhang
> Priority: Blocker
>
> Upgrading from 2.5.x to 3.0.0-alpha-2, migrateNamespaceTable kicks in to copy
> data from the namespace table to an "ns" family of the meta table. If you
> don't have an "ns" family, the migration fails and the hmaster will crash
> loop. You then can't rollback, because the briefly alive upgraded hmaster
> created a procedure that can't be deserialized by 2.x (I don't have this log
> handy unfortunately). I tried pushing code to create the ns family on
> startup, but it doesnt work becuase the migration happens while the hmaster
> is still initializing.
> So it seems imperative that you create the ns family before upgrading. We
> should handle this more gracefully.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)