snowflake-jdbc
snowflake-jdbc copied to clipboard
SNOW-1161547: number of retries is fixed to 0 for getQueryMetadata from queryID
Please answer these questions before submitting your issue. In order to accurately debug the issue this information is required. Thanks!
-
What version of JDBC driver are you using? 3.13.3, however it seems the issue also exists in the current master branch
-
What operating system and processor architecture are you using? Linux, Intel
-
What version of Java are you using? Scala 2.12
-
What did you do? I used
snowflake spark connector
to load data to snowflake tables in scala. -
What did you expect to see?
The load should complete without error, however, sometimes the data load failed with the following error
SnowflakeSQLLoggedException: No response or invalid response from GET request. Error: {}
at net.snowflake.client.core.SFSession.getQueryStatus(SFSession.java:190)
at net.snowflake.client.jdbc.SFAsyncResultSet.getStatus(SFAsyncResultSet.java:101)
at net.snowflake.client.jdbc.SFAsyncResultSet.getRealResults(SFAsyncResultSet.java:162)
at net.snowflake.client.jdbc.SFAsyncResultSet.getMetaData(SFAsyncResultSet.java:277)
at net.snowflake.spark.snowflake.io.StageWriter$.executeCopyIntoTable(StageWriter.scala:603)
at net.snowflake.spark.snowflake.io.StageWriter$.writeToTableWithStagingTable(StageWriter.scala:471)
I took a look at the JDBC code which snowflake spark connector
uses. Function getQueryMetadata function is used to obtain query status from the queryID. However, one thing I do not understand is why the fifth parameter of HttpUtil.executeGeneralRequest is hardcoded to 0 which means it is not allowed to have retry. Do we know why the number of tries is set to 0? Is this a bug or intended?
-
Can you set logging to DEBUG and collect the logs?
https://community.snowflake.com/s/article/How-to-generate-log-file-on-Snowflake-connectors
-
What is your Snowflake account identifier, if any? (Optional)