Skip to content

PHOENIX-6083 View index creation does a checkAndPut on an incorrect r… - #929

Merged
ChinmaySKulkarni merged 1 commit into
apache:masterfrom
richardantal:PHOENIX-6083
Nov 5, 2020
Merged

PHOENIX-6083 View index creation does a checkAndPut on an incorrect r…#929
ChinmaySKulkarni merged 1 commit into
apache:masterfrom
richardantal:PHOENIX-6083

Conversation

@richardantal

Copy link
Copy Markdown
Contributor

…ow key

@richardantal

Copy link
Copy Markdown
ContributorAuthor

@ChinmaySKulkarni Can you review this change please?

For the view index creation we created a mutex for <column family>:<column name> I changed it to <column family>.<column name>
For the other occurrences this checkAndPut was only for <column name> so I changed those to <column family>.<column name> as well.

@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 💚mvninstall44m 28smaster passed
+1 💚compile1m 6smaster passed
+1 💚checkstyle1m 24smaster passed
+1 💚javadoc0m 53smaster passed
+0 🆗spotbugs3m 33sphoenix-core in master has 973 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall45m 16sthe patch passed
+1 💚compile1m 0sthe patch passed
+1 💚javac1m 0sthe patch passed
-1 ❌checkstyle1m 26sphoenix-core: The patch generated 33 new + 2781 unchanged - 36 fixed = 2814 total (was 2817)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 53sthe patch passed
+1 💚spotbugs3m 21sthe patch passed
_ Other Tests _
-1 ❌unit96m 10sphoenix-core in the patch failed.
+1 💚asflicense0m 26sThe patch does not generate ASF License warnings.
203m 8s
ReasonTests
Failed junit testsphoenix.end2end.ConcurrentMutationsExtendedIT
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-929/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#929
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux 18f1c4ee868b 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 / 5b58d9b
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-929/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-929/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-929/1/testReport/
Max. process+thread count6437 (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-929/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.

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

Overall looks good (have a few small comments). Thanks for fixing this @richardantal!

String fullViewName = SchemaUtil.getTableName(viewSchemaName, viewName);

createBaseTable(schemaName, tableName, false, null, null, true);
Connection conn = getConnection();

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.

nit: try-with-resources for the connection

try {
conn.createStatement().execute("CREATE INDEX " + indexName + " ON " + fullViewName + " (v1)");
} catch (SQLException e) {
failedMsg[0] = e.getMessage();

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.

nit: Can we store and hence later assert the SQLException code rather than the exception message?

for (ColumnName colName : requiredCols) {
// acquire the mutex using the global physical table name to
// prevent this column from being dropped while the index is being created
String colNameSeparatedByDot = colName.getColumnName().replace(':', '.');

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.

Good to either extract this out as a SchemaUtil API and/or add a comment here. Is there some existing API which makes the indexed column name have a ':' instead of '.'?

@ChinmaySKulkarni

Copy link
Copy Markdown
Contributor

Looks like testConcurrentUpsertsWithNoIndexedColumns timedout after this change. Good to check that

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 33sDocker 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 💚mvninstall36m 11smaster passed
+1 💚compile0m 58smaster passed
+1 💚checkstyle1m 39smaster passed
+1 💚javadoc0m 44smaster passed
+0 🆗spotbugs2m 52sphoenix-core in master has 973 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall34m 35sthe patch passed
+1 💚compile1m 4sthe patch passed
+1 💚javac1m 4sthe patch passed
-1 ❌checkstyle1m 33sphoenix-core: The patch generated 34 new + 2781 unchanged - 36 fixed = 2815 total (was 2817)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 50sthe patch passed
+1 💚spotbugs3m 49sthe patch passed
_ Other Tests _
-1 ❌unit102m 35sphoenix-core in the patch failed.
+1 💚asflicense0m 30sThe patch does not generate ASF License warnings.
190m 35s
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-929/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#929
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux ce8572f7b741 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 / 5b58d9b
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-929/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-929/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-929/2/testReport/
Max. process+thread count7045 (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-929/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.

@richardantal

Copy link
Copy Markdown
ContributorAuthor

testConcurrentUpsertsWithNoIndexedColumns ran successfully on the second time.
I have also tested it locally and it was OK.

@richardantal

Copy link
Copy Markdown
ContributorAuthor

Thank you@ChinmaySKulkarni for the review!

I have updated the PR according to the comments.

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 29sDocker 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 47smaster passed
+1 💚compile0m 59smaster passed
+1 💚checkstyle1m 53smaster passed
+1 💚javadoc0m 45smaster passed
+0 🆗spotbugs3m 18sphoenix-core in master has 973 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall7m 42sthe patch passed
+1 💚compile0m 53sthe patch passed
+1 💚javac0m 53sthe patch passed
-1 ❌checkstyle1m 41sphoenix-core: The patch generated 42 new + 3460 unchanged - 41 fixed = 3502 total (was 3501)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 43sthe patch passed
+1 💚spotbugs3m 17sthe patch passed
_ Other Tests _
-1 ❌unit106m 4sphoenix-core in the patch failed.
+1 💚asflicense0m 28sThe patch does not generate ASF License warnings.
143m 40s
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-929/3/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#929
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux 3af14c00279c 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 / 4703e46
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-929/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-929/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-929/3/testReport/
Max. process+thread count6961 (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-929/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.

@richardantal

Copy link
Copy Markdown
ContributorAuthor

I have resolved the conflicts.
@ChinmaySKulkarni Can you merge it please?

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 28sDocker 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 42smaster passed
+1 💚compile0m 58smaster passed
+1 💚checkstyle1m 55smaster passed
+1 💚javadoc0m 43smaster passed
+0 🆗spotbugs2m 54sphoenix-core in master has 969 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall7m 23sthe patch passed
+1 💚compile0m 53sthe patch passed
+1 💚javac0m 53sthe patch passed
-1 ❌checkstyle1m 58sphoenix-core: The patch generated 4 new + 3498 unchanged - 3 fixed = 3502 total (was 3501)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 41sthe patch passed
+1 💚spotbugs3m 4sthe patch passed
_ Other Tests _
-1 ❌unit96m 40sphoenix-core in the patch failed.
+1 💚asflicense0m 26sThe patch does not generate ASF License warnings.
133m 14s
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-929/4/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#929
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux f180ba8f581a 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 / ff46e35
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-929/4/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-929/4/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-929/4/testReport/
Max. process+thread count6863 (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-929/4/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.

@ChinmaySKulkarni

Copy link
Copy Markdown
Contributor

@richardantal can you please put up a patch for 4.x branch too? I will commit to both master and 4.x at the same time for consistency. Also, please squash all commits into 1.

@richardantal
richardantalforce-pushed the PHOENIX-6083 branch 2 times, most recently from 2a0ddfa to 8ef65eeCompareNovember 2, 2020 17:09
@richardantal

Copy link
Copy Markdown
ContributorAuthor

Sure, thank you @ChinmaySKulkarni
I have squashed the commits into one and back ported this change to 4.x.

@stoty

stoty commented Nov 2, 2020

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 32sDocker 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 37smaster passed
+1 💚compile0m 58smaster passed
+1 💚checkstyle1m 58smaster passed
+1 💚javadoc0m 44smaster passed
+0 🆗spotbugs2m 51sphoenix-core in master has 969 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall7m 22sthe patch passed
+1 💚compile0m 55sthe patch passed
+1 💚javac0m 55sthe patch passed
-1 ❌checkstyle1m 57sphoenix-core: The patch generated 4 new + 3502 unchanged - 3 fixed = 3506 total (was 3505)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 46sthe patch passed
+1 💚spotbugs3m 10sthe patch passed
_ Other Tests _
-1 ❌unit96m 14sphoenix-core in the patch failed.
+1 💚asflicense0m 27sThe patch does not generate ASF License warnings.
133m 6s
ReasonTests
Failed junit testsphoenix.end2end.OrphanViewToolIT
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-929/5/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#929
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux fe1a27fd47c0 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 / e828ef7
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-929/5/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-929/5/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-929/5/testReport/
Max. process+thread count7059 (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-929/5/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

stoty commented Nov 2, 2020

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec4m 26sDocker 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 38smaster passed
+1 💚compile0m 57smaster passed
+1 💚checkstyle1m 49smaster passed
+1 💚javadoc0m 44smaster passed
+0 🆗spotbugs2m 57sphoenix-core in master has 969 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall7m 32sthe patch passed
+1 💚compile0m 54sthe patch passed
+1 💚javac0m 54sthe patch passed
-1 ❌checkstyle1m 59sphoenix-core: The patch generated 42 new + 3463 unchanged - 41 fixed = 3505 total (was 3504)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 42sthe patch passed
+1 💚spotbugs3m 3sthe patch passed
_ Other Tests _
-1 ❌unit95m 35sphoenix-core in the patch failed.
+1 💚asflicense0m 27sThe patch does not generate ASF License warnings.
136m 19s
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-929/6/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#929
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux beae7190b0bd 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 / e828ef7
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-929/6/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-929/6/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-929/6/testReport/
Max. process+thread count6743 (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-929/6/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.

@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 small comments, looks good otherwise.

Comment threadphoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java Outdated
conn.createStatement().execute("CREATE VIEW " + fullViewName + " AS SELECT * FROM " + fullTableName);
conn.commit();

final int[] exceptionCode = new int[1];

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.

Not a strong opinion but since we want threads to mutate exceptionCode, maybe we can use AtomicInteger for exceptionCode rather than array with size 1, threads can set values and finally we can assert with assertEquals(exceptionCode.get(), 301) if you would prefer :)

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.

exceptionCode is accessed from an inner class so has to be final, in order to be able to change its value from the other thread it has to be an array.
We can use AtomicInteger array but I am not sure if it adds any value.

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.

I meant AtomicInteger as mutable final object similar to an array.
e.g

 final AtomicInteger exceptionCode = new AtomicInteger();

&

 } catch (SQLException e) {
exceptionCode.set(e.getErrorCode());
throw new RuntimeException(e);
} finally {
doneSignal.countDown();
}

&

 assertEquals(exceptionCode.get(), 301);

Thought?

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.

Yeah I think this a better solution. Nice one :)
Thanks for the review @virajjasani I have updated the commit.

@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

@stoty

stoty commented Nov 3, 2020

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 27sDocker 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 47smaster passed
+1 💚compile0m 58smaster passed
+1 💚checkstyle1m 39smaster passed
+1 💚javadoc0m 44smaster passed
+0 🆗spotbugs2m 50sphoenix-core in master has 969 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall7m 36sthe patch passed
+1 💚compile0m 51sthe patch passed
+1 💚javac0m 51sthe patch passed
-1 ❌checkstyle1m 41sphoenix-core: The patch generated 1 new + 2818 unchanged - 3 fixed = 2819 total (was 2821)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 43sthe patch passed
+1 💚spotbugs3m 8sthe patch passed
_ Other Tests _
-1 ❌unit94m 24sphoenix-core in the patch failed.
+1 💚asflicense0m 27sThe patch does not generate ASF License warnings.
130m 49s
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-929/7/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#929
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux 6d34abc8f41c 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 / d8a0a8a
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-929/7/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-929/7/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-929/7/testReport/
Max. process+thread count6814 (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-929/7/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

stoty commented Nov 3, 2020

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 29sDocker 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 40smaster passed
+1 💚compile0m 58smaster passed
+1 💚checkstyle1m 41smaster passed
+1 💚javadoc0m 42smaster passed
+0 🆗spotbugs2m 59sphoenix-core in master has 969 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall7m 30sthe patch passed
+1 💚compile1m 6sthe patch passed
+1 💚javac1m 6sthe patch passed
-1 ❌checkstyle1m 33sphoenix-core: The patch generated 1 new + 2818 unchanged - 3 fixed = 2819 total (was 2821)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 49sthe patch passed
+1 💚spotbugs3m 40sthe patch passed
_ Other Tests _
-1 ❌unit98m 1sphoenix-core in the patch failed.
+1 💚asflicense0m 27sThe patch does not generate ASF License warnings.
135m 7s
ReasonTests
Failed junit testsphoenix.end2end.OrphanViewToolIT
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-929/8/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#929
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux 34e0a772b643 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 / d8a0a8a
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-929/8/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-929/8/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-929/8/testReport/
Max. process+thread count7017 (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-929/8/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.

@ChinmaySKulkarni
ChinmaySKulkarni merged commit e49c8ff into apache:masterNov 5, 2020
@ChinmaySKulkarni

Copy link
Copy Markdown
Contributor

Thanks @richardantal

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.

4 participants

@richardantal@stoty@ChinmaySKulkarni@virajjasani