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

Fix: Return entire stack trace for deadline exceeded error #347

Merged
merged 2 commits into from Feb 8, 2021

Conversation

zoercai
Copy link
Contributor

@zoercai zoercai commented Feb 8, 2021

Cloud Spanner JDBC Driver stack trace is not clear on cause of the issue when there is a DEADLINE_EXCEEDED error, making it more difficult for the customer and Cloud Support to debug the issue. This PR modifies the exception mapping to return the original exception rather than the message only, so that the entire stack trace is shown.

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

@zoercai zoercai requested a review from a team as a code owner February 8, 2021 04:49
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/java-spanner-jdbc API. label Feb 8, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Feb 8, 2021
@codecov
Copy link

codecov bot commented Feb 8, 2021

Codecov Report

Merging #347 (b82b420) into master (4daa18d) will increase coverage by 0.62%.
The diff coverage is 78.43%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #347      +/-   ##
============================================
+ Coverage     71.35%   71.98%   +0.62%     
- Complexity     1114     1131      +17     
============================================
  Files            24       24              
  Lines          3474     3520      +46     
  Branches        531      537       +6     
============================================
+ Hits           2479     2534      +55     
+ Misses          778      767      -11     
- Partials        217      219       +2     
Impacted Files Coverage Δ Complexity Δ
...java/com/google/cloud/spanner/jdbc/JdbcDriver.java 62.85% <ø> (ø) 15.00 <0.00> (ø)
...le/cloud/spanner/jdbc/JdbcSqlExceptionFactory.java 44.44% <0.00%> (-1.27%) 7.00 <0.00> (ø)
.../java/com/google/cloud/spanner/jdbc/JdbcArray.java 71.81% <83.33%> (+15.75%) 28.00 <14.00> (+15.00)
...a/com/google/cloud/spanner/jdbc/JdbcResultSet.java 75.34% <0.00%> (+0.54%) 190.00% <0.00%> (+2.00%)
...va/com/google/cloud/spanner/jdbc/JdbcDataType.java 75.80% <0.00%> (+17.74%) 4.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4daa18d...534beab. Read the comment docs.

@zoercai zoercai changed the title Return entire stack trace for deadline exceeded error Fix: Return entire stack trace for deadline exceeded error Feb 8, 2021
@olavloite olavloite merged commit 2f94976 into master Feb 8, 2021
@olavloite olavloite deleted the 179198578-deadline-exceeded-stacktrace branch February 8, 2021 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner-jdbc API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants