Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Oct 16, 2020
Merged

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

merged 5 commits into from
Oct 16, 2020

Conversation

virajjasani
Copy link
Contributor

No description provided.

@virajjasani virajjasani changed the title PHOENIX-6185 : Propagate info available in SQLExceptionInfo to OPERATION_TIMED_OUT PHOENIX-6185 : Propagate info available in SQLExceptionInfo to SQLTimeoutException Oct 13, 2020
Copy link
Contributor

@gjacoby126 gjacoby126 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@stoty
Copy link
Contributor

stoty commented Oct 13, 2020

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 9s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The 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 💚 mvninstall 45m 8s master passed
+1 💚 compile 1m 2s master passed
+1 💚 checkstyle 0m 39s master passed
+1 💚 javadoc 0m 48s master passed
+0 🆗 spotbugs 3m 7s phoenix-core in master has 973 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚 mvninstall 42m 2s the patch passed
+1 💚 compile 0m 57s the patch passed
+1 💚 javac 0m 57s the patch passed
-1 ❌ checkstyle 0m 40s phoenix-core: The patch generated 3 new + 580 unchanged - 1 fixed = 583 total (was 581)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 javadoc 0m 48s the patch passed
+1 💚 spotbugs 3m 18s the patch passed
_ Other Tests _
-1 ❌ unit 123m 21s phoenix-core in the patch failed.
+1 💚 asflicense 0m 22s The patch does not generate ASF License warnings.
225m 43s
Reason Tests
Failed junit tests phoenix.end2end.UpgradeIT
phoenix.end2end.ConcurrentMutationsExtendedIT
Subsystem Report/Notes
Docker ClientAPI=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 Tests dupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
uname Linux 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 tool maven
Personality dev/phoenix-personality.sh
git revision master / b4afc08
Default Java Private Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstyle https://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
unit https://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 Results https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-919/1/testReport/
Max. process+thread count 6152 (vs. ulimit of 30000)
modules C: phoenix-core U: phoenix-core
Console output https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-919/1/console
versions git=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@virajjasani
Copy link
Contributor Author

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

@virajjasani
Copy link
Contributor Author

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
Contributor

stoty commented Oct 15, 2020

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 15m 44s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The 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 💚 mvninstall 57m 59s master passed
+1 💚 compile 1m 27s master passed
+1 💚 checkstyle 0m 58s master passed
+1 💚 javadoc 1m 10s master passed
+0 🆗 spotbugs 5m 14s phoenix-core in master has 973 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚 mvninstall 54m 59s the patch passed
+1 💚 compile 1m 33s the patch passed
+1 💚 javac 1m 33s the patch passed
-1 ❌ checkstyle 1m 2s phoenix-core: The patch generated 3 new + 580 unchanged - 1 fixed = 583 total (was 581)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 javadoc 1m 15s the patch passed
+1 💚 spotbugs 5m 43s the patch passed
_ Other Tests _
-1 ❌ unit 295m 42s phoenix-core in the patch failed.
+1 💚 asflicense 0m 36s The patch does not generate ASF License warnings.
447m 0s
Reason Tests
Failed junit tests phoenix.end2end.join.HashJoinNoIndexIT
phoenix.end2end.index.IndexMetadataIT
Subsystem Report/Notes
Docker ClientAPI=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 Tests dupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
uname Linux 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 tool maven
Personality dev/phoenix-personality.sh
git revision master / 5b2eeb6
Default Java Private Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstyle https://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
unit https://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 Results https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-919/2/testReport/
Max. process+thread count 6588 (vs. ulimit of 30000)
modules C: phoenix-core U: phoenix-core
Console output https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-919/2/console
versions git=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@virajjasani
Copy link
Contributor Author

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

Copy link
Contributor

@shahrs87 shahrs87 left a comment

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
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
Contributor Author

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
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 ?

Copy link
Contributor Author

@virajjasani virajjasani Oct 15, 2020

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
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
Contributor Author

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
Contributor

stoty commented Oct 15, 2020

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 30s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 1s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The 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 💚 mvninstall 36m 31s master passed
+1 💚 compile 0m 56s master passed
+1 💚 checkstyle 0m 44s master passed
+1 💚 javadoc 0m 45s master passed
+0 🆗 spotbugs 2m 50s phoenix-core in master has 973 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚 mvninstall 32m 48s the patch passed
+1 💚 compile 0m 52s the patch passed
+1 💚 javac 0m 52s the patch passed
+1 💚 checkstyle 0m 44s phoenix-core: The patch generated 0 new + 580 unchanged - 1 fixed = 580 total (was 581)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 javadoc 0m 43s the patch passed
+1 💚 spotbugs 2m 59s the patch passed
_ Other Tests _
-1 ❌ unit 94m 47s phoenix-core in the patch failed.
+1 💚 asflicense 0m 28s The patch does not generate ASF License warnings.
178m 18s
Reason Tests
Failed junit tests phoenix.end2end.UpsertSelectIT
phoenix.end2end.ParameterizedIndexUpgradeToolIT
Subsystem Report/Notes
Docker ClientAPI=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 Tests dupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
uname Linux 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 tool maven
Personality dev/phoenix-personality.sh
git revision master / fe7c46c
Default Java Private Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
unit https://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 Results https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-919/3/testReport/
Max. process+thread count 7105 (vs. ulimit of 30000)
modules C: phoenix-core U: phoenix-core
Console output https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-919/3/console
versions git=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@shahrs87 shahrs87 left a comment

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
Contributor

stoty commented Oct 15, 2020

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 31s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ master Compile Tests _
-1 ❌ mvninstall 36m 51s root in master failed.
+1 💚 compile 0m 56s master passed
+1 💚 checkstyle 0m 44s master passed
+1 💚 javadoc 0m 42s master passed
+0 🆗 spotbugs 2m 54s phoenix-core in master has 973 extant spotbugs warnings.
_ Patch Compile Tests _
-1 ❌ mvninstall 32m 52s root in the patch failed.
+1 💚 compile 0m 54s the patch passed
+1 💚 javac 0m 54s the patch passed
+1 💚 checkstyle 0m 44s phoenix-core: The patch generated 0 new + 580 unchanged - 1 fixed = 580 total (was 581)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 javadoc 0m 44s the patch passed
+1 💚 spotbugs 3m 0s the patch passed
_ Other Tests _
-1 ❌ unit 95m 22s phoenix-core in the patch failed.
+1 💚 asflicense 0m 22s The patch does not generate ASF License warnings.
179m 9s
Subsystem Report/Notes
Docker ClientAPI=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 Tests dupname asflicense javac javadoc unit spotbugs hbaseanti checkstyle compile
uname Linux 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 tool maven
Personality dev/phoenix-personality.sh
git revision master / 628fa0d
Default Java Private Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
mvninstall https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-919/5/artifact/yetus-general-check/output/branch-mvninstall-root.txt
mvninstall https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-919/5/artifact/yetus-general-check/output/patch-mvninstall-root.txt
unit https://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 Results https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-919/5/testReport/
Max. process+thread count 6912 (vs. ulimit of 30000)
modules C: phoenix-core U: phoenix-core
Console output https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-919/5/console
versions git=2.7.4 maven=3.3.9 spotbugs=4.1.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@gjacoby126 gjacoby126 merged commit 1784848 into apache:master Oct 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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants