Skip to content

Commit

Permalink
more debugs, yum
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffery-Wasty committed Sep 19, 2024
1 parent 825a284 commit 4e61b54
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1956,7 +1956,7 @@ Connection connect(Properties propsIn, SQLServerPooledConnection pooledConnectio
for (int connectRetryAttempt = 0, tlsRetryAttempt = 0;;) {
try {
System.out.println("---------------------Entered main loop---------------------");
System.out.println("(1) connectRetryCount=" + connectRetryCount);
System.out.println("\t(1) connectRetryCount=" + connectRetryCount);
if (0 == elapsedSeconds || elapsedSeconds < loginTimeoutSeconds) {
if (0 < tlsRetryAttempt && INTERMITTENT_TLS_MAX_RETRY > tlsRetryAttempt) {
if (connectionlogger.isLoggable(Level.FINE)) {
Expand Down Expand Up @@ -1994,7 +1994,8 @@ Connection connect(Properties propsIn, SQLServerPooledConnection pooledConnectio
+ INTERMITTENT_TLS_MAX_RETRY + ") reached. ");
}
}
System.out.println("(2) connectRetryCount=" + connectRetryCount);
System.out.println("\t(2) connectRetryCount=" + connectRetryCount);
System.out.println("\tconnectRetryAttempt: " + connectRetryAttempt);

if (0 == connectRetryCount) {
// connection retry disabled
Expand All @@ -2011,6 +2012,8 @@ Connection connect(Properties propsIn, SQLServerPooledConnection pooledConnectio
// only retry if transient error
SQLServerError sqlServerError = e.getSQLServerError();
if (!TransientError.isTransientError(sqlServerError)) {
System.out.println("----------------------THROW ON NON-TRANSIENT ERROR--------------------");
System.out.println(e.getSQLServerError());
throw e;
}

Expand All @@ -2023,6 +2026,9 @@ Connection connect(Properties propsIn, SQLServerPooledConnection pooledConnectio
+ connectRetryInterval + ")s >= loginTimeout(" + loginTimeoutSeconds
+ ")s");
}
System.out.println("----------------------THROW ON NO TIME TO RETRY--------------------");
System.out.println("(elapsedSeconds + connectRetryInterval): " + (elapsedSeconds + connectRetryInterval));
System.out.println("loginTimeout: " + loginTimeoutSeconds);
throw e;
}

Expand All @@ -2034,10 +2040,12 @@ Connection connect(Properties propsIn, SQLServerPooledConnection pooledConnectio
}
if (connectRetryAttempt > 1) {
// We do not sleep for first retry; first retry is immediate
System.out.println("Sleeping for: " + TimeUnit.SECONDS.toMillis(connectRetryInterval) + " ms");
System.out.println("\tSleeping for: " + TimeUnit.SECONDS.toMillis(connectRetryInterval) + " ms");
sleepForInterval(TimeUnit.SECONDS.toMillis(connectRetryInterval));
}
System.out.println("\tEND OF ELSE (2)");
}
System.out.println("\tEND OF ELSE (1)");
}
}
}
Expand Down

0 comments on commit 4e61b54

Please sign in to comment.