Skip to content

PHOENIX-6506 : Tenant Connection is not able to access/validate Global Sequences - #1261

Merged
virajjasani merged 2 commits into
apache:masterfrom
lokiore:PHOENIX-6506
Jul 29, 2021
Merged

PHOENIX-6506 : Tenant Connection is not able to access/validate Global Sequences#1261
virajjasani merged 2 commits into
apache:masterfrom
lokiore:PHOENIX-6506

Conversation

@lokiore

Copy link
Copy Markdown
Contributor

No description provided.

@stoty

stoty commented Jul 7, 2021

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 31sDocker 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.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall23m 55smaster passed
+0hbaserecompile30m 55sHBase recompiled.
+1 💚compile1m 4smaster passed
+1 💚checkstyle1m 8smaster passed
+1 💚javadoc0m 53smaster passed
+0 🆗spotbugs3m 6sphoenix-core in master has 965 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall13m 39sthe patch passed
+0hbaserecompile23m 44sHBase recompiled.
+1 💚compile1m 4sthe patch passed
+1 💚javac1m 4sthe patch passed
-1 ❌checkstyle1m 29sphoenix-core: The patch generated 14 new + 2227 unchanged - 0 fixed = 2241 total (was 2227)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 51sthe patch passed
+1 💚spotbugs3m 16sthe patch passed
_ Other Tests _
-1 ❌unit113m 14sphoenix-core in the patch failed.
+1 💚asflicense0m 43sThe patch does not generate ASF License warnings.
182m 6s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1261/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#1261
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaserebuild hbaseanti checkstyle compile
unameLinux 416eee8a37f0 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/phoenix-personality.sh
git revisionmaster / 62f63c8
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1261/1/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1261/1/artifact/yetus-general-check/output/patch-unit-phoenix-core.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1261/1/testReport/
Max. process+thread count15650 (vs. ulimit of 30000)
modulesC: phoenix-core U: phoenix-core
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1261/1/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@mnpoonia

Copy link
Copy Markdown
Contributor

@lokiore - Looks like there are checkstyle issues and some unit test are failing

@virajjasanivirajjasani 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.

Skimmed, left few comments

@virajjasani

virajjasani commented Jul 16, 2021

Copy link
Copy Markdown
Contributor

@abhishek-chouhan@dbwong@gjacoby126 Could you please take a look when you have some bandwidth?

@virajjasanivirajjasani 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.

Left few more comments

Comment threadphoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertValuesIT.java Outdated
Comment threadphoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertValuesIT.java Outdated
Comment threadphoenix-core/src/it/java/org/apache/phoenix/end2end/UpsertValuesIT.java Outdated
@virajjasani

Copy link
Copy Markdown
Contributor

@stoty I agree and we have 4.x backport PR #1270 with proper Java 7 semantics so I think we are good with this PR using streams and eventually land on master and 5.1.
4.x branch is still stuck with Java 7 because of HBase 1 support but our CI builds still use JDK 1.8 so it doesn't catch such issues.

@virajjasanivirajjasani 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.

+1, pending QA

@abhishek-chouhan

Copy link
Copy Markdown
Contributor

I'm not sure if this is a bug. Tenants are allowed to create their own sequences and use those for their operations. In general tenant connections are not able to see data associated with a global non-tenant connection. This could also be considered similar to that. I do think there is value in having a shared sequence across tenants, however need to think more if that should be through enabling it generally, like this pr aims to do, or having something like a "multi-tenant" sequence (create sequnce .. multi-tenant=true). @gjacoby126@virajjasani

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 31sDocker 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.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall22m 24smaster passed
+0hbaserecompile29m 16sHBase recompiled.
+1 💚compile1m 3smaster passed
+1 💚checkstyle1m 26smaster passed
+1 💚javadoc0m 53smaster passed
+0 🆗spotbugs3m 22sphoenix-core in master has 964 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall14m 23sthe patch passed
+0hbaserecompile24m 34sHBase recompiled.
+1 💚compile1m 7sthe patch passed
+1 💚javac1m 7sthe patch passed
-1 ❌checkstyle1m 24sphoenix-core: The patch generated 20 new + 2221 unchanged - 6 fixed = 2241 total (was 2227)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 52sthe patch passed
+1 💚spotbugs3m 32sthe patch passed
_ Other Tests _
+1 💚unit113m 34sphoenix-core in the patch passed.
+1 💚asflicense0m 18sThe patch does not generate ASF License warnings.
179m 51s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1261/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#1261
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaserebuild hbaseanti checkstyle compile
unameLinux 69278de4d602 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 6842c1d
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstylehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1261/2/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1261/2/testReport/
Max. process+thread count14213 (vs. ulimit of 30000)
modulesC: phoenix-core U: phoenix-core
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1261/2/console
versionsgit=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@virajjasani

Copy link
Copy Markdown
Contributor

I do think there is value in having a shared sequence across tenants, however need to think more if that should be through enabling it generally, like this pr aims to do, or having something like a "multi-tenant" sequence (create sequnce .. multi-tenant=true)

Nice one, yeah if not the global sequence, maybe a special type of multi-tenant sequence (i.e new attribute attached to sequence) that can make it accessible to all tenants.

@abhishek-chouhan

Copy link
Copy Markdown
Contributor

Lets repurpose/open a new jira, which introduces multi-tenant sequences unless there are objections.

@gjacoby126

Copy link
Copy Markdown
Contributor

@abhishek-chouhan@virajjasani - I believe the usual pattern in Phoenix is that a tenant connection should already be able to see global things. For example, if you get a tenant connection and query a non-MT table, you should be able to get rows back. Tenant connections afaik just add "WHERE [TenantId Column] = [Your connection's tenantId]" to all multi-tenant tables.

@lokiore

Copy link
Copy Markdown
ContributorAuthor

@gjacoby126@abhishek-chouhan@virajjasani - What you guys think should be next steps for this!?
Is this good or we need to repurpose!?

@virajjasani

Copy link
Copy Markdown
Contributor

I believe the usual pattern in Phoenix is that a tenant connection should already be able to see global things. For example, if you get a tenant connection and query a non-MT table, you should be able to get rows back.

Tenant connection can read from global views as well. I think this approach also would be good enough i.e having global sequence accessible to tenant connection. If we are good to go with this approach, changes look good to me per my previous reviews. I was just curious about the final decision on the approach we decide to go ahead with.
@abhishek-chouhan WDYT? Does this sound good to you?

@abhishek-chouhan

Copy link
Copy Markdown
Contributor

Makes sense. Should be fine to go ahead with this since it gives us parity with the current behavior as @gjacoby126 rightly pointed out.

@virajjasani

Copy link
Copy Markdown
Contributor

Sounds good. Thanks @abhishek-chouhan@gjacoby126 for your valuable inputs.
Will merge this after 24 hr unless there are any objections on this PR.

@virajjasani
virajjasani merged commit a4f0304 into apache:masterJul 29, 2021
virajjasani pushed a commit that referenced this pull request Jul 29, 2021
…l Sequences (#1261)
Signed-off-by: Viraj Jasani <vjasani@apache.org>
virajjasani pushed a commit that referenced this pull request Jul 29, 2021
…l Sequences (#1270) (#1261)
Signed-off-by: Viraj Jasani <vjasani@apache.org>
virajjasani pushed a commit that referenced this pull request Jul 29, 2021
…l Sequences (#1270) (#1261)
Signed-off-by: Viraj Jasani <vjasani@apache.org>
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

@lokiore@stoty@mnpoonia@virajjasani@abhishek-chouhan@gjacoby126@dbwong