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

Add 42108 and 42109 to transient errors list #1643

Merged
merged 1 commit into from
Aug 30, 2021
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 @@ -168,6 +168,8 @@ default ResultSet executeSDPEv1(PreparedStatement stmt, String userSql,
* param names
* @param connection
* connection
* @param sqlServerStatement
* sqlServerStatement
* @param stmt
* statement
* @param rs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1310,6 +1310,8 @@ final SQLCollation getDatabaseCollation() {
static final private java.util.logging.Logger loggerExternal = java.util.logging.Logger
.getLogger("com.microsoft.sqlserver.jdbc.Connection");
private static String loggingClassNameBase = "com.microsoft.sqlserver.jdbc.SQLServerConnection";

/** Instance-specific loggingClassName to identity the connection in logs */
private String loggingClassName = loggingClassNameBase;

/**
Expand Down
10 changes: 8 additions & 2 deletions src/main/java/com/microsoft/sqlserver/jdbc/SQLServerError.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ enum TransientError {
*/
SQLSERVER_ERROR_4221(4221),

// The follow are from SqlClient
// The following are from SqlClient

// Resource ID: %d. The %s limit for the database is %d and has been reached.
SQLSERVER_ERROR_10928(10928),
Expand All @@ -72,7 +72,13 @@ enum TransientError {
* Resource ID: %d. The %s minimum guarantee is %d, maximum limit is %d and the current usage for the database
* is %d. However, the server is currently too busy to support requests greater than %d for this database.
*/
SQLSERVER_ERROR_10929(10929);
SQLSERVER_ERROR_10929(10929),

// Can not connect to the SQL pool since it is paused. Please resume the SQL pool and try again.
SQLSERVER_ERROR_42108(42108),

// The SQL pool is warming up. Please try again.
SQLSERVER_ERROR_42109(42109);

private final int errNo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
class SQLServerLexer extends Lexer {
static {
RuntimeMetaData.checkVersion("4.7.2", RuntimeMetaData.VERSION);
RuntimeMetaData.checkVersion("4.9.2", RuntimeMetaData.VERSION);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this for? this doesn't have anything to do with transient errors?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's to fix the build warning we've been getting since bumping the ANTLR dependency from 4.7.2 to 4.9.2.

}

protected static final DFA[] _decisionToDFA;
Expand Down