Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1310,6 +1310,7 @@ public SFConnectionHandler getSfConnectionHandler() {
/**
* @return auth timeout in seconds
*/
@Deprecated
public abstract int getAuthTimeout();

/**
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/net/snowflake/client/core/SFSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public class SFSession extends SFBaseSession {
*/
private int networkTimeoutInMilli = 0; // in milliseconds

private int authTimeout = 0;
@Deprecated private int authTimeout = 0;
private boolean enableCombineDescribe = false;
private Duration httpClientConnectionTimeout = HttpUtil.getConnectionTimeout();
private Duration httpClientSocketTimeout = HttpUtil.getSocketTimeout();
Expand Down Expand Up @@ -232,7 +232,7 @@ private JsonNode getQueryMetadata(String queryID) throws SQLException {
HttpUtil.executeGeneralRequest(
get,
loginTimeout,
authTimeout,
0,
(int) httpClientSocketTimeout.toMillis(),
maxHttpRetries,
getHttpClientKey());
Expand Down Expand Up @@ -1139,7 +1139,7 @@ protected void heartbeat() throws SFException, SQLException {
HttpUtil.executeGeneralRequest(
postRequest,
SF_HEARTBEAT_TIMEOUT,
authTimeout,
0,
(int) httpClientSocketTimeout.toMillis(),
0,
getHttpClientKey());
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/snowflake/client/core/SessionUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ static void closeSession(SFLoginInput loginInput) throws SFException, SnowflakeS
HttpUtil.executeGeneralRequest(
postRequest,
loginInput.getLoginTimeout(),
loginInput.getAuthTimeout(),
0,
loginInput.getSocketTimeoutInMillis(),
0,
loginInput.getHttpClientSettingsKey());
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/snowflake/client/core/StmtUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ public static StmtOutput execute(StmtInput stmtInput, ExecTimeTelemetryData exec
HttpUtil.executeRequest(
httpRequest,
stmtInput.networkTimeoutInMillis / 1000,
stmtInput.socketTimeout,
0,
stmtInput.socketTimeout,
stmtInput.maxRetries,
stmtInput.injectSocketTimeout,
stmtInput.canceling,
Expand Down Expand Up @@ -621,8 +621,8 @@ protected static String getQueryResult(String getResultPath, StmtInput stmtInput
return HttpUtil.executeRequest(
httpRequest,
stmtInput.networkTimeoutInMillis / 1000,
stmtInput.socketTimeout,
0,
stmtInput.socketTimeout,
stmtInput.maxRetries,
0,
stmtInput.canceling,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ else if (context.getQrmk() != null) {
httpClient,
httpRequest,
context.getNetworkTimeoutInMilli() / 1000, // retry timeout
context.getAuthTimeout(),
0,
context.getSocketTimeout(),
0,
0, // no socket timeout injection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public void download(
httpClient,
httpRequest,
session.getNetworkTimeoutInMilli() / 1000, // retry timeout
session.getAuthTimeout(),
0,
session.getHttpClientSocketTimeout(),
getMaxRetries(),
0, // no socket timeout injection
Expand Down Expand Up @@ -426,7 +426,7 @@ public InputStream downloadToStream(
httpClient,
httpRequest,
session.getNetworkTimeoutInMilli() / 1000, // retry timeout
session.getAuthTimeout(),
0,
session.getHttpClientSocketTimeout(),
getMaxRetries(),
0, // no socket timeout injection
Expand Down Expand Up @@ -619,7 +619,6 @@ public void uploadWithPresignedUrlWithoutConnection(

uploadWithPresignedUrl(
networkTimeoutInMilli,
0, // auth timeout
(int) HttpUtil.getSocketTimeout().toMillis(),
meta.getContentEncoding(),
meta.getUserMetadata(),
Expand Down Expand Up @@ -711,7 +710,6 @@ public void upload(
logger.debug("Starting upload with downscope token", false);
uploadWithPresignedUrl(
session.getNetworkTimeoutInMilli(),
session.getAuthTimeout(),
session.getHttpClientSocketTimeout(),
meta.getContentEncoding(),
meta.getUserMetadata(),
Expand Down Expand Up @@ -882,7 +880,6 @@ private void uploadWithDownScopedToken(
*/
private void uploadWithPresignedUrl(
int networkTimeoutInMilli,
int authTimeout,
int httpClientSocketTimeout,
String contentEncoding,
Map<String, String> metadata,
Expand Down Expand Up @@ -923,7 +920,7 @@ private void uploadWithPresignedUrl(
httpClient,
httpRequest,
networkTimeoutInMilli / 1000, // retry timeout
authTimeout, // auth timeout
0,
httpClientSocketTimeout, // socket timeout in ms
getMaxRetries(),
0, // no socket timeout injection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ private boolean sendBatch() throws IOException {
: HttpUtil.executeGeneralRequest(
post,
TELEMETRY_HTTP_RETRY_TIMEOUT_IN_SEC,
this.session.getAuthTimeout(),
0,
this.session.getHttpClientSocketTimeout(),
0,
this.session.getHttpClientKey());
Expand Down