Skip to content

PHOENIX-6185 : Propagate info available in SQLExceptionInfo to SQLTimeoutException - #919

Merged
gjacoby126 merged 5 commits into
apache:masterfrom
virajjasani:PHOENIX-6185-master
Oct 16, 2020
Merged

PHOENIX-6185 : Propagate info available in SQLExceptionInfo to SQLTimeoutException#919
gjacoby126 merged 5 commits into
apache:masterfrom
virajjasani:PHOENIX-6185-master

Conversation

@virajjasani

Copy link
Copy Markdown
Contributor

No description provided.

@virajjasanivirajjasani changed the title PHOENIX-6185 : Propagate info available in SQLExceptionInfo to OPERATION_TIMED_OUTPHOENIX-6185 : Propagate info available in SQLExceptionInfo to SQLTimeoutExceptionOct 13, 2020

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

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 9sDocker 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 💚mvninstall45m 8smaster passed
+1 💚compile1m 2smaster passed
+1 💚checkstyle0m 39smaster passed
+1 💚javadoc0m 48smaster passed
+0 🆗spotbugs3m 7sphoenix-core in master has 973 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall42m 2sthe patch passed
+1 💚compile0m 57sthe patch passed
+1 💚javac0m 57sthe patch passed
-1 ❌checkstyle0m 40sphoenix-core: The patch generated 3 new + 580 unchanged - 1 fixed = 583 total (was 581)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 48sthe patch passed
+1 💚spotbugs3m 18sthe patch passed
_ Other Tests _
-1 ❌unit123m 21sphoenix-core in the patch failed.
+1 💚asflicense0m 22sThe patch does not generate ASF License warnings.
225m 43s
ReasonTests
Failed junit testsphoenix.end2end.UpgradeIT
phoenix.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-919/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#919
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux ebfb4a51b34f 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 / b4afc08
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-919/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-919/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-919/1/testReport/
Max. process+thread count6152 (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-919/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.

@virajjasani

Copy link
Copy Markdown
ContributorAuthor

It's strange that build data is not available on ci-hadoop. Perhaps some clearn up took place?

@virajjasani

Copy link
Copy Markdown
ContributorAuthor

UpgradeIT and ConcurrentMutationsExtendedIT are passing locally. However, for effective checkstyle change of 2, we need build data. Will try after sometime because as of now, no new build is getting triggered.

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec15m 44sDocker 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 💚mvninstall57m 59smaster passed
+1 💚compile1m 27smaster passed
+1 💚checkstyle0m 58smaster passed
+1 💚javadoc1m 10smaster passed
+0 🆗spotbugs5m 14sphoenix-core in master has 973 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall54m 59sthe patch passed
+1 💚compile1m 33sthe patch passed
+1 💚javac1m 33sthe patch passed
-1 ❌checkstyle1m 2sphoenix-core: The patch generated 3 new + 580 unchanged - 1 fixed = 583 total (was 581)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc1m 15sthe patch passed
+1 💚spotbugs5m 43sthe patch passed
_ Other Tests _
-1 ❌unit295m 42sphoenix-core in the patch failed.
+1 💚asflicense0m 36sThe patch does not generate ASF License warnings.
447m 0s
ReasonTests
Failed junit testsphoenix.end2end.join.HashJoinNoIndexIT
phoenix.end2end.index.IndexMetadataIT
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-919/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#919
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux 607d8335a5d8 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 / 5b2eeb6
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-919/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-919/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-919/2/testReport/
Max. process+thread count6588 (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-919/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

@gjacoby126 checkstyle is fixed, should be visible in next build. This applies directly to 4.x. Would you like me to create 4.x PR?

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

just 1 minor comment. other than ltgm.

(info.getMessage() != null ? info.getMessage() : "")
+ (info.getRootCause() != null ? " , rootCause: "
+ info.getRootCause() : "");
return new SQLTimeoutException(reason,

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.

Sorry missed this in my previous review.
If there is root cause exception present, you should use this constructor to create SQLtimeoutException

public SQLTimeoutException(String reason,
String SQLState,
int vendorCode,
Throwable cause)

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.

Done

assertEquals(OPERATION_TIMED_OUT.getErrorCode(),
e.getErrorCode());
assertTrue(e.getMessage().contains("Query couldn't be " +
"completed in the allotted time: 5000 ms"));

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.

Should we check that e.getCause() != null ?

@virajjasanivirajjasaniOct 15, 2020

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.

Actually it is null in this case because for the test, rootCause is not provided here (BaseResultIterators):

 throw new SQLExceptionInfo.Builder(OPERATION_TIMED_OUT).setMessage(
". Query couldn't be completed in the allotted time: "
+ queryTimeOut + " ms").build().buildException();

However, I tested by manually adding rootCause and receiving on test side. Hence, it is working fine but since relevant source code does not add root cause, e.getCause() != null would not be true here.

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 Can we just write a unit test creating OPERATION_TIMED_OUT exception with custom message and custom fake exception. Ideally we wouldn't even need integration test but the test that you wrote is very nice.

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.

Done. Let's keep both unit and IT.
Thanks

@stoty

Copy link
Copy Markdown
Contributor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 30sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 1sThe 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 31smaster passed
+1 💚compile0m 56smaster passed
+1 💚checkstyle0m 44smaster passed
+1 💚javadoc0m 45smaster passed
+0 🆗spotbugs2m 50sphoenix-core in master has 973 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall32m 48sthe patch passed
+1 💚compile0m 52sthe patch passed
+1 💚javac0m 52sthe patch passed
+1 💚checkstyle0m 44sphoenix-core: The patch generated 0 new + 580 unchanged - 1 fixed = 580 total (was 581)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 43sthe patch passed
+1 💚spotbugs2m 59sthe patch passed
_ Other Tests _
-1 ❌unit94m 47sphoenix-core in the patch failed.
+1 💚asflicense0m 28sThe patch does not generate ASF License warnings.
178m 18s
ReasonTests
Failed junit testsphoenix.end2end.UpsertSelectIT
phoenix.end2end.ParameterizedIndexUpgradeToolIT
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-919/3/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#919
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux 88d54f4246cb 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 / fe7c46c
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-919/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-919/3/testReport/
Max. process+thread count7105 (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-919/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.

@shahrs87shahrs87 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 ltgm pending jenkins run. Thank you @virajjasani for fixing nitty comments. :)

@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 appears to include 1 new or modified test files.
_ master Compile Tests _
-1 ❌mvninstall36m 51sroot in master failed.
+1 💚compile0m 56smaster passed
+1 💚checkstyle0m 44smaster passed
+1 💚javadoc0m 42smaster passed
+0 🆗spotbugs2m 54sphoenix-core in master has 973 extant spotbugs warnings.
_ Patch Compile Tests _
-1 ❌mvninstall32m 52sroot in the patch failed.
+1 💚compile0m 54sthe patch passed
+1 💚javac0m 54sthe patch passed
+1 💚checkstyle0m 44sphoenix-core: The patch generated 0 new + 580 unchanged - 1 fixed = 580 total (was 581)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 44sthe patch passed
+1 💚spotbugs3m 0sthe patch passed
_ Other Tests _
-1 ❌unit95m 22sphoenix-core in the patch failed.
+1 💚asflicense0m 22sThe patch does not generate ASF License warnings.
179m 9s
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-919/5/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#919
Optional Testsdupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
unameLinux 9c7dffc0a44f 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 / 628fa0d
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
mvninstallhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-919/5/artifact/yetus-general-check/output/branch-mvninstall-root.txt
mvninstallhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-919/5/artifact/yetus-general-check/output/patch-mvninstall-root.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-919/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-919/5/testReport/
Max. process+thread count6912 (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-919/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.

@gjacoby126
gjacoby126 merged commit 1784848 into apache:masterOct 16, 2020
gjacoby126 pushed a commit that referenced this pull request Oct 16, 2020
…eoutException (#919)
PHOENIX-6185 : Propagate info available in SQLExceptionInfo to OPERATION_TIMED_OUT
@virajjasani
virajjasani deleted the PHOENIX-6185-master branch October 17, 2020 10:20
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

@virajjasani@stoty@shahrs87@gjacoby126