-
Notifications
You must be signed in to change notification settings - Fork 171
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
SNOW-1886186 - gather threadExecutor callables and call Future.get() to prevent silent fails #2035
base: master
Are you sure you want to change the base?
SNOW-1886186 - gather threadExecutor callables and call Future.get() to prevent silent fails #2035
Conversation
src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java
Outdated
Show resolved
Hide resolved
src/test/java/net/snowflake/client/jdbc/FileUploaderLatestIT.java
Outdated
Show resolved
Hide resolved
…m and upload/downloadFiles
@@ -1792,6 +1793,7 @@ private void downloadFiles() throws SnowflakeSQLException { | |||
throw new SnowflakeSQLLoggedException( | |||
queryID, session, ErrorCode.INTERRUPTED.getMessageCode(), SqlState.QUERY_CANCELED); | |||
} catch (ExecutionException ex) { | |||
logger.error("Exception encountered within threadExecutor flow in downloadFiles"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add ex to the log
@@ -1664,6 +1664,7 @@ private void uploadStream() throws SnowflakeSQLException { | |||
throw new SnowflakeSQLLoggedException( | |||
queryID, session, ErrorCode.INTERRUPTED.getMessageCode(), SqlState.QUERY_CANCELED); | |||
} catch (ExecutionException ex) { | |||
logger.error("Exception encountered within threadExecutor flow in uploadStream"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add ex to the log
@@ -1902,6 +1904,7 @@ private void uploadFiles(Set<String> fileList, int parallel) throws SnowflakeSQL | |||
throw new SnowflakeSQLLoggedException( | |||
queryID, session, ErrorCode.INTERRUPTED.getMessageCode(), SqlState.QUERY_CANCELED); | |||
} catch (ExecutionException ex) { | |||
logger.error("Exception encountered within threadExecutor flow in uploadFiles"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add ex
Overview
SNOW-1886186
Currently errors thrown inside download/upload File callables are ignored since future.get() is not executed. This PR adds aggregating futures and then calling get to surface any inner exception that occurred during download/upload
Pre-review self checklist
master
branchmvn -P check-style validate
)mvn verify
and inspecttarget/japicmp/japicmp.html
)SNOW-XXXX:
External contributors - please answer these questions before submitting a pull request. Thanks!
What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Issue: #NNNN
Fill out the following pre-review checklist:
@SnowflakeJdbcInternalApi
(note that public/protected methods/fields in classes marked with this annotation are already internal)Please describe how your code solves the related issue.
Please write a short description of how your code change solves the related issue.