Skip to content

HBASE-25902 HMaster failed to start with NoSuchColumnFamilyException during upgrade from HBase 1.x to HBase 2.x - #3287

Closed
pankaj72981 wants to merge 1 commit into
apache:masterfrom
pankaj72981:HBASE-25902
Closed

HBASE-25902 HMaster failed to start with NoSuchColumnFamilyException during upgrade from HBase 1.x to HBase 2.x#3287
pankaj72981 wants to merge 1 commit into
apache:masterfrom
pankaj72981:HBASE-25902

Conversation

@pankaj72981

Copy link
Copy Markdown
Contributor

HMaste should validate the meta table descriptor during startup and rewrite if any mismatch, meanwhile RegionServer should read the default meta table descriptor to avoid inconsistencies.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec6m 38sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗mvndep0m 20sMaven dependency ordering for branch
+1 💚mvninstall4m 14smaster passed
+1 💚compile4m 3smaster passed
+1 💚checkstyle1m 35smaster passed
+1 💚spotbugs2m 56smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for patch
+1 💚mvninstall4m 1sthe patch passed
+1 💚compile4m 6sthe patch passed
+1 💚javac4m 6sthe patch passed
+1 💚checkstyle1m 32sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck21m 18sPatch does not cause any errors with Hadoop 3.1.2 3.2.1 3.3.0.
+1 💚spotbugs3m 56sthe patch passed
_ Other Tests _
+1 💚asflicense0m 28sThe patch does not generate ASF License warnings.
64m 17s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3287/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#3287
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile
unameLinux 8288ddba4355 4.15.0-128-generic #131-Ubuntu SMP Wed Dec 9 06:57:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 7c24ed4
Default JavaAdoptOpenJDK-1.8.0_282-b08
Max. process+thread count86 (vs. ulimit of 30000)
modulesC: hbase-common hbase-server U: .
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3287/1/console
versionsgit=2.17.1 maven=3.6.3 spotbugs=4.2.2
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

* List of column families that cannot be deleted from the hbase:meta table.
* They are critical to cluster operation. This is a bit of an odd place to
* keep this list but then this is the tooling that does add/remove. Keeping
* it local!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is wrong, right? We don't have any tooling in HConstants.

This should go where table descriptors are defined and managed.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, will move it back to ModifyTableProcedure


// Default meta table descriptor, will be used by RegionServer during rolling upgrade until
// HMaster write latest 2.x meta table descriptor
private TableDescriptor defaultMetaTableDesc = null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens when using this "default descriptor" the regionserver attempts to update meta? Can that happen? We are assuming the master will rewrite soon, but is that valid? Regionservers don't run masters, they rely on an operator to do that. Who knows what the operator is doing.

Would it be better to address specific fallbacks where something is missing or not expected?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RegionServer can't update the meta descriptor,
org.apache.hadoop.hbase.regionserver.HRegionServer#canUpdateTableDescriptor

TableDescriptor td = getTableDescriptorFromFs(fs, rootdir, TableName.META_TABLE_NAME);
validateMetaTableDescriptor(td);
return td;
} catch (TableInfoMissingException | NoSuchColumnFamilyException e) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense. The table might be missing altogether (what current code handles), or might be missing a column family due to legacy (what this change handles)

} catch (TableInfoMissingException | NoSuchColumnFamilyException e) {
// Meta is still in old format, return the default meta table descriptor util we have meta
// descriptor in HBase 2.x format
return defaultMetaTableDesc;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems wrong.

createMetaTableDescriptorBuilder should return a builder for what the current version of the code expects.

If we need fallbacks to ride over an upgrade case, those fallbacks should be implemented where the errors are happening.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems wrong.

createMetaTableDescriptorBuilder should return a builder for what the current version of the code expects.

If we need fallbacks to ride over an upgrade case, those fallbacks should be implemented where the errors are happening.

In the current version of code createMetaTableDescriptorBuilder is used only during HMaster startup via InitMetaProcedure when table info file is missing.
Agree it is a hack (defaultMetaTableDesc = null), where RegionServer will get the default meta descriptor (createMetaTableDescriptorBuilder) until HMaster rewrite the proper one.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 27sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 23sMaven dependency ordering for branch
+1 💚mvninstall4m 24smaster passed
+1 💚compile1m 38smaster passed
+1 💚shadedjars8m 7sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 7smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 16sMaven dependency ordering for patch
+1 💚mvninstall4m 15sthe patch passed
+1 💚compile1m 36sthe patch passed
+1 💚javac1m 36sthe patch passed
+1 💚shadedjars8m 5spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 3sthe patch passed
_ Other Tests _
+1 💚unit2m 0shbase-common in the patch passed.
+1 💚unit139m 22shbase-server in the patch passed.
175m 23s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3287/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#3287
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 3376807a9d61 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 7c24ed4
Default JavaAdoptOpenJDK-11.0.10+9
Test Resultshttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3287/1/testReport/
Max. process+thread count3753 (vs. ulimit of 30000)
modulesC: hbase-common hbase-server U: .
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3287/1/console
versionsgit=2.17.1 maven=3.6.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec3m 54sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 22sMaven dependency ordering for branch
+1 💚mvninstall3m 53smaster passed
+1 💚compile1m 24smaster passed
+1 💚shadedjars8m 11sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 0smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 16sMaven dependency ordering for patch
+1 💚mvninstall3m 41sthe patch passed
+1 💚compile1m 25sthe patch passed
+1 💚javac1m 25sthe patch passed
+1 💚shadedjars8m 5spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 57sthe patch passed
_ Other Tests _
+1 💚unit1m 49shbase-common in the patch passed.
+1 💚unit146m 57shbase-server in the patch passed.
184m 33s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3287/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#3287
Optional Testsjavac javadoc unit shadedjars compile
unameLinux e852c131c085 4.15.0-136-generic #140-Ubuntu SMP Thu Jan 28 05:20:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 7c24ed4
Default JavaAdoptOpenJDK-1.8.0_282-b08
Test Resultshttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3287/1/testReport/
Max. process+thread count3744 (vs. ulimit of 30000)
modulesC: hbase-common hbase-server U: .
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3287/1/console
versionsgit=2.17.1 maven=3.6.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache9

Copy link
Copy Markdown
Contributor

I think the goal for HBASE-23055 is to give us a way to not need to always upgrade region server first when there is a meta schema change, so I think we should try to do this less hacky.
In general, after master starts, it should check whether the meta has all the required families, if not, it should schedule a ModifyTableProcedure to change the meta schema, instead of updating the table descriptor directly, as a ModifyTableProcedure will trigger a region reopen at region server side, so we do not need to hack at region server side.
Thanks.

@virajjasani

Copy link
Copy Markdown
Contributor

I think it would be better to catch NoSuchColumnFamilyException by master and then let master schedule ModifyTableProcedure which can take care of adding missing CF. Performing this operation with Procedure should save us from any missing edge case or possible hidden race condition.

@virajjasani

Copy link
Copy Markdown
Contributor

Closing as resolved by #3417 , Thanks @pankaj72981

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@pankaj72981@Apache-HBase@Apache9@virajjasani@apurtell