Skip to content

Commit

Permalink
ARTEMIS-1980 Warn on failed check of table existence should be info
Browse files Browse the repository at this point in the history
DB2 metadata checks should erroneously report stale table existence on
not existing/just deleted table, making the subsequent warning logs
of failed SELECT COUNT useless and scaring: should be better to let
them lowered to INFO level

(cherry picked from commit 46542fb)
  • Loading branch information
franz1981 committed Nov 4, 2018
1 parent 65213eb commit 1fef3dc
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -242,7 +242,12 @@ private void createTableIfNotExists(String tableName, String... sqls) throws SQL
}
}
} catch (SQLException e) {
logger.warn(JDBCUtils.appendSQLExceptionDetails(new StringBuilder("Can't verify the initialization of table ").append(tableName).append(" due to:"), e, sqlProvider.getCountJournalRecordsSQL()));
//that's not a real issue and do not deserve any user-level log:
//some DBMS just return stale information about table existence
//and can fail on later attempts to access them
if (logger.isTraceEnabled()) {
logger.trace(JDBCUtils.appendSQLExceptionDetails(new StringBuilder("Can't verify the initialization of table ").append(tableName).append(" due to:"), e, sqlProvider.getCountJournalRecordsSQL()));
}
try {
connection.rollback();
} catch (SQLException rollbackEx) {
Expand Down

0 comments on commit 1fef3dc

Please sign in to comment.