Skip to content

HBASE-26055 Master local region "table" should be considered a system… - #3447

Open
z-york wants to merge 1 commit into
apache:masterfrom
z-york:master
Open

HBASE-26055 Master local region "table" should be considered a system…#3447
z-york wants to merge 1 commit into
apache:masterfrom
z-york:master

Conversation

@z-york

Copy link
Copy Markdown
Contributor

… table

The master local region is not a typical Table/Region, however, we should consider it a system table when creating the TableName so that if we call isSystemTable() it returns true.

@z-york

Copy link
Copy Markdown
ContributorAuthor

One open question with this one: Should we prevent a user from creating a "master" namespace? Currently createNamespace doesn't fail for system namespaces (because it's assumed that the namespace already exists). In this case, the namespace doesn't exist, but the master namespace prefix is being used for a system table.

@z-york
z-york requested review from Apache9 and saintstackJune 30, 2021 22:18
@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 7sDocker 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 23sMaven dependency ordering for branch
+1 💚mvninstall3m 51smaster passed
+1 💚compile4m 4smaster passed
+1 💚checkstyle1m 28smaster passed
+1 💚spotbugs2m 47smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 13sMaven dependency ordering for patch
+1 💚mvninstall3m 37sthe patch passed
+1 💚compile4m 0sthe patch passed
+1 💚javac4m 0sthe patch passed
+1 💚checkstyle1m 27sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck18m 24sPatch does not cause any errors with Hadoop 3.1.2 3.2.1 3.3.0.
+1 💚spotbugs3m 9sthe patch passed
_ Other Tests _
+1 💚asflicense0m 27sThe patch does not generate ASF License warnings.
53m 6s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3447/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#3447
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile
unameLinux ea775843c42e 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 147b030
Default JavaAdoptOpenJDK-1.8.0_282-b08
Max. process+thread count96 (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-3447/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.

@taklwu

Copy link
Copy Markdown
Contributor

The master namespace logic looks good to me, but I have a minor question, do you see anywhere we have any procedure or cleanup logic delete the master namespace ?

Should we prevent a user from creating a "master" namespace? Currently createNamespace doesn't fail for system namespaces (because it's assumed that the namespace already exists)

I found below that the prepareCreate as part fo the CreateNamespaceProcedure should fail if the namespace already exists, and you're right that it didn't protect the system namespace(s).

so, can you explain in what case the system namespaces in the meta table before it comes online would have the pre-existed namespaces? is it from a previous version ?

/**
* Action before any real action of creating namespace.
* @param env MasterProcedureEnv
*/
privatebooleanprepareCreate(finalMasterProcedureEnvenv) throwsIOException {
if (getTableNamespaceManager(env).doesNamespaceExist(nsDescriptor.getName())) {
setFailure("master-create-namespace",
newNamespaceExistException("Namespace " + nsDescriptor.getName() + " already exists"));
returnfalse;
}
getTableNamespaceManager(env).validateTableAndRegionCount(nsDescriptor);
checkNamespaceRSGroup(env, nsDescriptor);
returntrue;
}

@Apache9

Copy link
Copy Markdown
Contributor

Do you guys face any problems?

The master local region is not a typical table, so in general it should not be conflict with any real tables or regions. You could have a user level table called master:local, no problem.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 26sDocker 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 21sMaven dependency ordering for branch
+1 💚mvninstall4m 15smaster passed
+1 💚compile1m 24smaster passed
+1 💚shadedjars9m 6sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 58smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 13sMaven dependency ordering for patch
+1 💚mvninstall3m 57sthe patch passed
+1 💚compile1m 25sthe patch passed
+1 💚javac1m 25sthe patch passed
+1 💚shadedjars9m 0spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 56sthe patch passed
_ Other Tests _
+1 💚unit2m 2shbase-common in the patch passed.
+1 💚unit184m 37shbase-server in the patch passed.
220m 43s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3447/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#3447
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 384ee11222a9 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 / 147b030
Default JavaAdoptOpenJDK-1.8.0_282-b08
Test Resultshttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3447/1/testReport/
Max. process+thread count2223 (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-3447/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 🆗reexec1m 5sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 21sMaven dependency ordering for branch
+1 💚mvninstall5m 0smaster passed
+1 💚compile1m 45smaster passed
+1 💚shadedjars9m 5sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 6smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for patch
+1 💚mvninstall4m 56sthe patch passed
+1 💚compile1m 43sthe patch passed
+1 💚javac1m 43sthe patch passed
+1 💚shadedjars9m 10spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 4sthe patch passed
_ Other Tests _
+1 💚unit2m 11shbase-common in the patch passed.
+1 💚unit183m 30shbase-server in the patch passed.
223m 44s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3447/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#3447
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 7830fd98ca57 4.15.0-142-generic #146-Ubuntu SMP Tue Apr 13 01:11:19 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 147b030
Default JavaAdoptOpenJDK-11.0.10+9
Test Resultshttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3447/1/testReport/
Max. process+thread count2429 (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-3447/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.

@virajjasani

virajjasani commented Jul 5, 2021

Copy link
Copy Markdown
Contributor

Do you guys face any problems?

The master local region is not a typical table, so in general it should not be conflict with any real tables or regions. You could have a user level table called master:local, no problem.

I agree with @Apache9. I am kind of bit sceptical about making master local region as system table region. I might be missing something but does this improve any particular usecase?
On the other hand, if this has some significant advantage, perhaps we can make it optional feature?

@z-york

Copy link
Copy Markdown
ContributorAuthor

@Apache9@virajjasani Sorry, I was out for the holiday. I understand that this is a special region and it does not have a corresponding table/namespace created for it. We do have an internal patch/feature that makes use of the system table designation (see HBASE-18477). We block writes/updates for user tables, but not system tables (HBASE-18775). Without this flag being set, writes to the master local region will be blocked with our feature. Originally the system table status was stored in the HRegionInfo, but now only the Table knows if it is a system table or not.

I can add a hack/hardcode a check for the master local region. However, it still seems like this is technically a system region? In that case, why would we not denote it as a system region? It certainly is not in the user's domain, it is an internal HBase region.

I'm fine with not adding this to the reserved NS list/restricting creating the NS, but to me it still seems like it is a bug that this "table" (really region) isn't being considered a system table.

@Apache9

Copy link
Copy Markdown
Contributor

@Apache9@virajjasani Sorry, I was out for the holiday. I understand that this is a special region and it does not have a corresponding table/namespace created for it. We do have an internal patch/feature that makes use of the system table designation (see HBASE-18477). We block writes/updates for user tables, but not system tables (HBASE-18775). Without this flag being set, writes to the master local region will be blocked with our feature. Originally the system table status was stored in the HRegionInfo, but now only the Table knows if it is a system table or not.

I can add a hack/hardcode a check for the master local region. However, it still seems like this is technically a system region? In that case, why would we not denote it as a system region? It certainly is not in the user's domain, it is an internal HBase region.

I'm fine with not adding this to the reserved NS list/restricting creating the NS, but to me it still seems like it is a bug that this "table" (really region) isn't being considered a system table.

It is not a table actually... Neither a user table nor a system table...

So I suggest we should have a way to bypass the newly added logic, and we set this flag or config when constructing the master local region.

Thanks.

@wchevreuilwchevreuil left a comment

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.

Any plans for the (very hypothetical) case a user namespace named "master" already exists on a cluster running a previous version then decides to upgrade to the version having this change?

@saintstack

Copy link
Copy Markdown
Contributor

Any resolution here. We going to add a flag to bypass new logic?

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 25sDocker 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 16sMaven dependency ordering for branch
+1 💚mvninstall4m 7smaster passed
+1 💚compile4m 12smaster passed
+1 💚checkstyle1m 29smaster passed
+1 💚spotbugs2m 50smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for patch
+1 💚mvninstall3m 52sthe patch passed
+1 💚compile4m 7sthe patch passed
+1 💚javac4m 7sthe patch passed
+1 💚checkstyle1m 26sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck19m 39sPatch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.
+1 💚spotbugs3m 19sthe patch passed
_ Other Tests _
+1 💚asflicense0m 28sThe patch does not generate ASF License warnings.
55m 4s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3447/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#3447
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile
unameLinux d82a8b7b2c88 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 / f6348d4
Default JavaAdoptOpenJDK-1.8.0_282-b08
Max. process+thread count96 (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-3447/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.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 26sDocker 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 16sMaven dependency ordering for branch
+1 💚mvninstall4m 45smaster passed
+1 💚compile1m 42smaster passed
+1 💚shadedjars8m 29sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 9smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 17sMaven dependency ordering for patch
+1 💚mvninstall4m 33sthe patch passed
+1 💚compile1m 42sthe patch passed
+1 💚javac1m 42sthe patch passed
+1 💚shadedjars8m 25spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 8sthe patch passed
_ Other Tests _
+1 💚unit2m 5shbase-common in the patch passed.
-1 ❌unit140m 6shbase-server in the patch failed.
177m 27s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3447/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#3447
Optional Testsjavac javadoc unit shadedjars compile
unameLinux e546837b8e7f 4.15.0-156-generic #163-Ubuntu SMP Thu Aug 19 23:31:58 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / f6348d4
Default JavaAdoptOpenJDK-11.0.10+9
unithttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3447/1/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt
Test Resultshttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3447/1/testReport/
Max. process+thread count3715 (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-3447/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.

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.

7 participants

@z-york@Apache-HBase@taklwu@Apache9@virajjasani@saintstack@wchevreuil