Skip to content

PHOENIX-6082 : Avoid checkAndPut when altering properties for a table or view with column-encoding enabled - #982

Closed
virajjasani wants to merge 1 commit into
apache:masterfrom
virajjasani:PHOENIX-6082-master
Closed

PHOENIX-6082 : Avoid checkAndPut when altering properties for a table or view with column-encoding enabled#982
virajjasani wants to merge 1 commit into
apache:masterfrom
virajjasani:PHOENIX-6082-master

Conversation

@virajjasani

Copy link
Copy Markdown
Contributor

No description provided.

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 18sDocker 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 💚mvninstall14m 29smaster passed
+1 💚compile0m 59smaster passed
+1 💚checkstyle1m 16smaster passed
+1 💚javadoc0m 45smaster passed
+0 🆗spotbugs3m 8sphoenix-core in master has 966 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall9m 19sthe patch passed
+1 💚compile0m 57sthe patch passed
+1 💚javac0m 57sthe patch passed
-1 ❌checkstyle1m 15sphoenix-core: The patch generated 1 new + 2796 unchanged - 4 fixed = 2797 total (was 2800)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 46sthe patch passed
+1 💚spotbugs3m 20sthe patch passed
_ Other Tests _
-1 ❌unit159m 18sphoenix-core in the patch failed.
+1 💚asflicense0m 21sThe patch does not generate ASF License warnings.
199m 45s
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-982/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#982
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux de18c8f4b1fe 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 / f1a0860
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-982/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-982/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-982/1/testReport/
Max. process+thread count6167 (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-982/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.

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 8sDocker 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 💚mvninstall14m 20smaster passed
+1 💚compile1m 2smaster passed
+1 💚checkstyle1m 16smaster passed
+1 💚javadoc0m 48smaster passed
+0 🆗spotbugs3m 7sphoenix-core in master has 966 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall9m 2sthe patch passed
+1 💚compile0m 56sthe patch passed
+1 💚javac0m 56sthe patch passed
-1 ❌checkstyle1m 15sphoenix-core: The patch generated 1 new + 2796 unchanged - 4 fixed = 2797 total (was 2800)
+1 💚whitespace0m 1sThe patch has no whitespace issues.
+1 💚javadoc0m 46sthe patch passed
+1 💚spotbugs3m 21sthe patch passed
_ Other Tests _
-1 ❌unit158m 10sphoenix-core in the patch failed.
+1 💚asflicense0m 22sThe patch does not generate ASF License warnings.
198m 2s
ReasonTests
Failed junit testsphoenix.end2end.ViewTTLIT
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-982/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#982
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux 82fbfb032567 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 / f1a0860
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-982/2/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-982/2/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-982/2/testReport/
Max. process+thread count6216 (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-982/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
ContributorAuthor

Test failure with ViewTTLIT.testDeleteFromMultipleGlobalIndexes() is not relevant, confirmed locally.

@virajjasani

Copy link
Copy Markdown
ContributorAuthor

@ChinmaySKulkarni@yanxinyi could you please take a look?
Thanks

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

@virajjasani thanks for the patch! I have a few nit-type comments on your tests, otherwise lgtm. Can you please confirm this patch locally by scanning SYSTEM.MUTEX via HBase shell?

ResultSet resultSet = conn.createStatement().executeQuery(
"SELECT * FROM " + PhoenixDatabaseMetaData.SYSTEM_MUTEX_NAME);
if (resultSet.next()) {
isSysMutexEmpty.getAndSet(false);

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 can be a simple set() since you're not using the returned value right?

while (!Thread.interrupted() && !conn.isClosed()) {
try {
ResultSet resultSet = conn.createStatement().executeQuery(
"SELECT * FROM " + PhoenixDatabaseMetaData.SYSTEM_MUTEX_NAME);

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.

In case we do end up going this route then, just to be safe, can we query the exact expected row in SYSTEM.MUTEX instead of this query? If this gets run in parallel with any of the upgrade tests (where we acquire an upgrade mutex), your test will fail.

@virajjasanivirajjasani left a comment

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.

Thanks @ChinmaySKulkarni for the review.

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 6sDocker 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 💚mvninstall12m 33smaster passed
+1 💚compile0m 59smaster passed
+1 💚checkstyle1m 37smaster passed
+1 💚javadoc0m 44smaster passed
+0 🆗spotbugs2m 55sphoenix-core in master has 966 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall7m 37sthe patch passed
+1 💚compile0m 50sthe patch passed
+1 💚javac0m 50sthe patch passed
-1 ❌checkstyle1m 41sphoenix-core: The patch generated 1 new + 2796 unchanged - 4 fixed = 2797 total (was 2800)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 42sthe patch passed
+1 💚spotbugs3m 3sthe patch passed
_ Other Tests _
-1 ❌unit188m 29sphoenix-core in the patch failed.
+1 💚asflicense0m 27sThe patch does not generate ASF License warnings.
225m 25s
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-982/3/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#982
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux a59c248be7c6 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/phoenix-personality.sh
git revisionmaster / 457a67c
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-982/3/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-982/3/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-982/3/testReport/
Max. process+thread count6649 (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-982/3/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

virajjasani commented Nov 26, 2020

Copy link
Copy Markdown
ContributorAuthor

Can you please confirm this patch locally by scanning SYSTEM.MUTEX via HBase shell?

Sure, confirmed by scanning SYSTEM.MUTEX on local cluster with and without this patch.

Initially, updated SYSTEM.MUTEX with KEEP_DELETED_CELLS => 'TRUE' because while executing ALTER TABLE query, Mutex cell is going to be deleted soon (finally block), hence it appears only momentarily.

Screenshot 2020-11-26 at 10 26 59 PM


With patch, no records were found while scanning SYSTEM.MUTEX:

Screenshot 2020-11-26 at 10 10 42 PM


Without patch, executed ALTER TABLE query twice and found two deleted rows (first scan result after first execution of ALTER query, and second scan result after second execution of ALTER query) :

Screenshot 2020-11-26 at 10 35 41 PM


ALTER TABLE query used for testing:

Screenshot 2020-11-26 at 10 38 18 PM

@ChinmaySKulkarniChinmaySKulkarni 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 can you please put up a pr against 4.x too?
-- edit: nevermind, just saw #983
Anyone else want to take a look @yanxinyi@gjacoby126@jpisaac ?

@virajjasani

Copy link
Copy Markdown
ContributorAuthor

Thanks for the reviews @ChinmaySKulkarni@yanxinyi

@virajjasani
virajjasani deleted the PHOENIX-6082-master branch December 7, 2020 07:00
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.

3 participants

@virajjasani@stoty@ChinmaySKulkarni